Closed aschmied closed 2 months ago
Can you provide the output of rake db:second_base:rollback --trace
?
And your rails version?
I've included some warnings that I omitted in the original report.
> jruby bin\rake db:second_base:rollback --trace
jruby: warning: unknown property jruby.cext.enabled
C:/jruby/jruby-9.1.2.0/lib/ruby/gems/shared/gems/rubyzip-1.1.7/lib/zip.rb:35: warning: ObjectSpace impacts performance. See http://wiki.jruby.org/PerformanceTuning#dont-enable-objectspace
** Invoke db:second_base:rollback (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:second_base:rollback
rake aborted!
TypeError: can't dup NilClass
org/jruby/RubyKernel.java:1886:in `dup'
C:/jruby/jruby-9.1.2.0/lib/ruby/gems/shared/gems/activerecord-4.2.5.2/lib/active_record/connection_handling.rb:62:in `initialize'
C:/jruby/jruby-9.1.2.0/lib/ruby/gems/shared/gems/activerecord-4.2.5.2/lib/active_record/core.rb:46:in `configurations='
C:/jruby/jruby-9.1.2.0/lib/ruby/gems/shared/gems/secondbase-2.1.0/lib/second_base/on_base.rb:17:in `on_base'
C:/jruby/jruby-9.1.2.0/lib/ruby/gems/shared/gems/secondbase-2.1.0/lib/second_base/databases.rake:55:in `block in (root)'
C:/jruby/jruby-9.1.2.0/lib/ruby/gems/shared/gems/rake-11.1.2/lib/rake/task.rb:248:in `block in execute'
org/jruby/RubyArray.java:1593:in `each'
C:/jruby/jruby-9.1.2.0/lib/ruby/gems/shared/gems/rake-11.1.2/lib/rake/task.rb:243:in `execute'
C:/jruby/jruby-9.1.2.0/lib/ruby/gems/shared/gems/rake-11.1.2/lib/rake/task.rb:187:in `block in invoke_with_call_chain'
C:/jruby/jruby-9.1.2.0/lib/ruby/stdlib/monitor.rb:214:in `mon_synchronize'
C:/jruby/jruby-9.1.2.0/lib/ruby/gems/shared/gems/rake-11.1.2/lib/rake/task.rb:180:in `invoke_with_call_chain'
C:/jruby/jruby-9.1.2.0/lib/ruby/gems/shared/gems/rake-11.1.2/lib/rake/task.rb:173:in `invoke'
C:/jruby/jruby-9.1.2.0/lib/ruby/gems/shared/gems/rake-11.1.2/lib/rake/application.rb:150:in `invoke_task'
C:/jruby/jruby-9.1.2.0/lib/ruby/gems/shared/gems/rake-11.1.2/lib/rake/application.rb:106:in `block in top_level'
org/jruby/RubyArray.java:1593:in `each'
C:/jruby/jruby-9.1.2.0/lib/ruby/gems/shared/gems/rake-11.1.2/lib/rake/application.rb:106:in `block in top_level'
C:/jruby/jruby-9.1.2.0/lib/ruby/gems/shared/gems/rake-11.1.2/lib/rake/application.rb:115:in `run_with_threads'
C:/jruby/jruby-9.1.2.0/lib/ruby/gems/shared/gems/rake-11.1.2/lib/rake/application.rb:100:in `top_level'
C:/jruby/jruby-9.1.2.0/lib/ruby/gems/shared/gems/rake-11.1.2/lib/rake/application.rb:78:in `block in run'
C:/jruby/jruby-9.1.2.0/lib/ruby/gems/shared/gems/rake-11.1.2/lib/rake/application.rb:176:in `standard_exception_handling'
C:/jruby/jruby-9.1.2.0/lib/ruby/gems/shared/gems/rake-11.1.2/lib/rake/application.rb:75:in `run'
bin\rake:4:in `<top>'
Tasks: TOP => db:second_base:rollback
> jruby bin\rails --version
jruby: warning: unknown property jruby.cext.enabled
Rails 4.2.5.2
Sorry it took so long to get back to you, this appears to be a duplicate of #24. Can you try the mitigation steps listed there and see if they help?
Steps
rake db:migrate
rake db:second_base:rollback
Result
Expected
Migration is rolled back successfully
Note
If I change the config_key in "database.yml" back to secondbase then
rake db:second_base:rollback
works as expected.Environment
Jruby 9.1.2.0, Windows 10, secondbase 2.1.0