Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Undefined method `fetch` when doing `rake db:rollback` #6

Closed
mbillard opened this Issue Jan 22, 2014 · 2 comments

Comments

Projects
None yet
3 participants

It happens every time I try to rollback, no matter the content of the migration (even an empy migration).

Full stack trace below:

$ r db:rollback --trace
** Invoke db:rollback (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:rollback
==  AddInquirerEmailToGroupCreationInquiries: reverting =======================
rake aborted!
An error has occurred, all later migrations canceled:

undefined method `fetch' for nil:NilClass/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:167:in `initialize'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/mysql2_adapter.rb:36:in `initialize'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/mysql_online_migrations-1.0.1/lib/mysql_online_migrations/mysql2_adapter_without_lock.rb:12:in `initialize'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/mysql_online_migrations-1.0.1/lib/mysql_online_migrations.rb:16:in `new'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/mysql_online_migrations-1.0.1/lib/mysql_online_migrations.rb:16:in `connection'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:624:in `block in method_missing'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:597:in `block in say_with_time'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/benchmark.rb:281:in `measure'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:597:in `say_with_time'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:617:in `method_missing'
/Users/mbillard/code/hipyard-web/db/migrate/20140122152025_add_inquirer_email_to_group_creation_inquiries.rb:3:in `change'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:569:in `block in exec_migration'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:458:in `block (2 levels) in revert'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration/command_recorder.rb:38:in `revert'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:458:in `block in revert'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:605:in `suppress_messages'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:457:in `revert'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:569:in `exec_migration'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:555:in `block (2 levels) in migrate'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/benchmark.rb:281:in `measure'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:554:in `block in migrate'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:294:in `with_connection'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:553:in `migrate'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:709:in `migrate'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:959:in `block in execute_migration_in_transaction'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:1007:in `ddl_transaction'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:958:in `execute_migration_in_transaction'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:920:in `block in migrate'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:916:in `each'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:916:in `migrate'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:771:in `down'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:857:in `move'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/migration.rb:753:in `rollback'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.2/lib/active_record/railties/databases.rake:126:in `block (2 levels) in <top (required)>'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/task.rb:236:in `call'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/task.rb:236:in `block in execute'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/task.rb:231:in `each'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/task.rb:231:in `execute'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/task.rb:175:in `block in invoke_with_call_chain'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/task.rb:168:in `invoke_with_call_chain'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/task.rb:161:in `invoke'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:149:in `invoke_task'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:106:in `each'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:106:in `block in top_level'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:115:in `run_with_threads'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:100:in `top_level'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:78:in `block in run'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:75:in `run'
/Users/mbillard/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.1/bin/rake:33:in `<top (required)>'
/Users/mbillard/.rbenv/versions/2.0.0-p247/bin/rake:23:in `load'
/Users/mbillard/.rbenv/versions/2.0.0-p247/bin/rake:23:in `<main>'
/Users/mbillard/.rbenv/versions/2.0.0-p247/bin/ruby_executable_hooks:15:in `eval'
/Users/mbillard/.rbenv/versions/2.0.0-p247/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:rollback

👍

workaround to uncomment... bundle and run again. :-(

Owner

anthonyalberto commented Feb 15, 2014

Thanks for your patience :D

Fixed in the latest release (1.0.2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment