Created
May 19, 2014 15:21
-
-
Save sam452/604f57c0525cf3416129 to your computer and use it in GitHub Desktop.
Why am I getting rails 4 migrate super: no superclass method `version' activerecord errors when I rake db:migrate?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Migration successful on Windows. Commit and pushed to github. Pulled on Mac which has successfully run this app before. But migration fails on the Mac. | |
All other migrations on other Rails apps on the Mac fail with the same error. | |
Stepped down to Ruby 1.9.3 but failure repeats. | |
The only instance of 'version' that shows up in Sublime text of the app that is not commented out is in Schema.rb. The usage matches previous successful commits. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rake db:migrate --trace | |
** Invoke db:migrate (first_time) | |
** Invoke environment (first_time) | |
** Execute environment | |
** Invoke db:load_config (first_time) | |
** Execute db:load_config | |
** Execute db:migrate | |
rake aborted! | |
super: no superclass method `version' for #<ActiveRecord::SchemaMigration:0x00000101971a88> | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/activemodel-4.0.2/lib/active_model/attribute_methods.rb:436:in `method_missing' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/attribute_methods.rb:155:in `method_missing' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/schema_migration.rb:36:in `version' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:787:in `block in get_all_versions' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/relation/delegation.rb:13:in `map' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/relation/delegation.rb:13:in `map' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:787:in `get_all_versions' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:949:in `migrated' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:954:in `ran?' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:931:in `block in runnable' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:931:in `reject' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:931:in `runnable' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:908:in `migrate' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:764:in `up' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:742:in `migrate' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/railties/databases.rake:42:in `block (2 levels) in <top (required)>' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.1/lib/rake/task.rb:236:in `call' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.1/lib/rake/task.rb:236:in `block in execute' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.1/lib/rake/task.rb:231:in `each' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.1/lib/rake/task.rb:231:in `execute' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.1/lib/rake/task.rb:175:in `block in invoke_with_call_chain' | |
/Users/sam/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.1/lib/rake/task.rb:168:in `invoke_with_call_chain' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.1/lib/rake/task.rb:161:in `invoke' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.1/lib/rake/application.rb:149:in `invoke_task' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.1/lib/rake/application.rb:106:in `block (2 levels) in top_level' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.1/lib/rake/application.rb:106:in `each' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.1/lib/rake/application.rb:106:in `block in top_level' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.1/lib/rake/application.rb:115:in `run_with_threads' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.1/lib/rake/application.rb:100:in `top_level' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.1/lib/rake/application.rb:78:in `block in run' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.1/lib/rake/application.rb:75:in `run' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.1/bin/rake:33:in `<top (required)>' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/bin/rake:23:in `load' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/bin/rake:23:in `<main>' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `eval' | |
/Users/sam/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `<main>' | |
Tasks: TOP => db:migrate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't know if there are any other easy way of doing this, but I had to add this column manually to the schema_migrations table to get it work again.