2012-03-26 5 views
0

jruby on rails 애플리케이션에 기존 mysql 데이터베이스를 통합하려고합니다. 고객이 별도의 데이터베이스 용으로 구성되지 않은 베어 본 레일 뼈대를 제공했습니다. 우리는 나중에 sql 데이터베이스를 제공 받았고, mysql을 사용하여 애플리케이션에서 그것을 정수화하라는 요청을 받았습니다. needairy 정보가있는 database.yml 파일을 작성하여 시작했습니다. 그런 다음 rake db : create 명령을 실행하여 아래 오류 메시지가 나타납니다. 우리가 잘못하고있는 것에 대한 제안은? 우리는 무기력하다. 미리 Thx. 뭔가 다른 문제를 해결하고 관련 소스 코드까지를 가지고 발생이 동안 걸쳐 실행하는 데, 지금까지 말할 수있는 무엇JRuby on Rails rake db : 작업이 모두 jdbc로 중단됩니다. mysql

$ rake db:create --trace 
    rake aborted! 
    undefined method `each' for nil:NilClass 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/activerecord-jdbc-adapter-1.2.2/lib/arjdbc/jdbc/jdbc.rake:15:in `redefine_task' 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/activerecord-jdbc-adapter-1.2.2/lib/arjdbc/jdbc/jdbc.rake:23:in `(root)' 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/task_manager.rb:207:in `in_namespace' 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/dsl_definition.rb:102:in `namespace' 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/activerecord-jdbc-adapter-1.2.2/lib/arjdbc/jdbc/jdbc.rake:22:in `(root)' 
    org/jruby/RubyKernel.java:1052:in `load' 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/activerecord-jdbc-adapter-1.2.2/lib/arjdbc/jdbc/jdbc.rake:234:in `load' 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `load_dependency' 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:640:in `new_constants_in' 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:639:in `new_constants_in' 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `load_dependency' 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in `load' 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile' 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/default_loader.rb:6:in `load' 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:569:in `load_imports' 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:508:in `raw_load_rakefile' 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `load_rakefile' 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile' 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `run' 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run' 
    /Users/rath_rio/.rvm/gems/[email protected]/gems/rake-0.9.2.2/bin/rake:33:in `(root)' 
    org/jruby/RubyKernel.java:1052:in `load' 
    /Users/rath_rio/.rvm/gems/[email protected]/bin/rake:19:in `(root)' 

our system specification: 
Java SE 6 
JRuby 1.6.6 
Rails 3.1 

we use following gems for our datebase: 
gem 'mysql2', '~>0.3.0' 
gem "jdbc-mysql", "~> 5.1.13" 
gem "activerecord-jdbc-adapter", "~> 1.2.2" 
gem "activerecord-jdbcmysql-adapter", "~> 1.2.2" 

our database.yml file: 
development: 
    database: webgrouper_development 
    adapter: jdbcmysql 
    encoding: utf8 
    reconnect: true 
    pool: 5 
    username: root 
    password: 
    host: 127.0.0.1 

test: 
    database: webgrouper_test 
    adapter: jdbcmysql 
    encoding: utf8 
    reconnect: false 
    pool: 5 
    username: root 
    password: 
    host: 127.0.0.1 

production: 
    database: webgrouper_production 
    adapter: jdbcmysql 
    encoding: utf8 
    reconnect: false 
    pool: 5 
    username: root 
    password: 
    host: 127.0.0.1 

답변

0

이 레이크 작업이가에 대한 행동을 반복하려고하기 때문에 죽어 가고 있다는 것입니다 현재 작업이지만 동작 집합은 0입니다.

간결하고 주석 처리되지 않은 코드에서 잘못 수행 된 작업을 정확하게 이해하는 것은 어렵습니다. 이 믿을 수 없을 정도로 허약 한 시스템이 무너지고 있습니다. 나는 이상한 야생의 추측을 가지고있다. "adapter : jdbcmysql"을 "database : webgrouper_production"대신 YML에있는 각 데이터베이스 스탠자의 첫 번째 부분으로 입력하면 어떻게됩니까?

관련 문제