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