I am developing project on Ruby on Rails Till the present moment I used Rails 4 and everything was fine before I faced incapability issues with gems. I decided to rollback to Rails 3, changed my Gemfile, removed Gemfile.lock, all rails installations and railties. Then I run bundle install and installed Rails 3.2.13. However now when I run rake db:create everything is still fine. When I run rake db:migrate the problem begin:
JeffreeBook:llvoo kristijonas$ rake db:migrate
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.8
rake aborted!
undefined method `migration_error=' for ActiveRecord::Base:Class
/Users/kristijonas/.rvm/gems/ruby-1.9.3-p448@fashion/gems/activerecord-3.2.13/lib/active_record/dynamic_matchers.rb:55:in `method_missing'
/Users/kristijonas/.rvm/gems/ruby-1.9.3-p448@fashion/gems/activerecord-3.2.13/lib/active_record/railtie.rb:66:in `block (3 levels) in <class:Railtie>'
/Users/kristijonas/.rvm/gems/ruby-1.9.3-p448@fashion/gems/activerecord-3.2.13/lib/active_record/railtie.rb:65:in `each'
/Users/kristijonas/.rvm/gems/ruby-1.9.3-p448@fashion/gems/activerecord-3.2.13/lib/active_record/railtie.rb:65:in `block (2 levels) in <class:Railtie>'
/Users/kristijonas/.rvm/gems/ruby-1.9.3-p448@fashion/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
/Users/kristijonas/.rvm/gems/ruby-1.9.3-p448@fashion/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/Users/kristijonas/.rvm/gems/ruby-1.9.3-p448@fashion/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
/Users/kristijonas/.rvm/gems/ruby-1.9.3-p448@fashion/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:42:in `each'
/Users/kristijonas/.rvm/gems/ruby-1.9.3-p448@fashion/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
/Users/kristijonas/.rvm/gems/ruby-1.9.3-p448@fashion/gems/activerecord-3.2.13/lib/active_record/base.rb:720:in `<top (required)>'
/Users/kristijonas/.rvm/gems/ruby-1.9.3-p448@fashion/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:25:in `block (2 levels) in <top (required)>'
/Users/kristijonas/.rvm/gems/ruby-1.9.3-p448@fashion/bin/ruby_noexec_wrapper:14:in `eval'
/Users/kristijonas/.rvm/gems/ruby-1.9.3-p448@fashion/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => db:migrate => db:load_config
(See full trace by running task with --trace)
JeffreeBook:llvoo kristijonas$
How to resolve it?Everything is fine with db config
Rolling a Rails 4 project back to Rails 3 caused this error for me. Deleting the following line from config/environments/development.rb
fixed the issue:
config.active_record.migration_error = :page_load
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With