Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
rails 4 migration error
[vagrant@katello-buggy foreman{rails4_from_scratch}]$ rake db:migrate
API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
/home/vagrant/foreman/lib/foreman/renderer.rb:5: warning: already initialized constant ALLOWED_HELPERS
/home/vagrant/foreman/lib/foreman/renderer.rb:9: warning: already initialized constant ALLOWED_VARIABLES
/home/vagrant/foreman/lib/net/validations.rb:3: warning: already initialized constant IP_REGEXP
/home/vagrant/foreman/lib/net/validations.rb:4: warning: already initialized constant MAC_REGEXP
/home/vagrant/foreman/lib/net/validations.rb:5: warning: already initialized constant MAC_REGEXP_64BIT
/home/vagrant/foreman/lib/net/validations.rb:6: warning: already initialized constant HOST_REGEXP
/home/vagrant/foreman/lib/net/validations.rb:7: warning: already initialized constant MASK_REGEXP
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
rake aborted!
NoMethodError: undefined method `name' for "db/migrate":String
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-4.1.5/lib/active_record/migration.rb:1010:in `each'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-4.1.5/lib/active_record/migration.rb:1010:in `group_by'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-4.1.5/lib/active_record/migration.rb:1010:in `validate'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-4.1.5/lib/active_record/migration.rb:917:in `initialize'
/home/vagrant/foreman/app/services/foreman/plugin.rb:221:in `new'
/home/vagrant/foreman/app/services/foreman/plugin.rb:221:in `pending_migrations'
/home/vagrant/foreman/app/services/foreman/plugin.rb:199:in `permission'
/home/vagrant/foreman-tasks/lib/foreman_tasks/engine.rb:19:in `block (3 levels) in <class:Engine>'
/home/vagrant/foreman/app/services/foreman/plugin.rb:190:in `instance_eval'
/home/vagrant/foreman/app/services/foreman/plugin.rb:190:in `security_block'
/home/vagrant/foreman-tasks/lib/foreman_tasks/engine.rb:18:in `block (2 levels) in <class:Engine>'
/home/vagrant/foreman/app/services/foreman/plugin.rb:64:in `instance_eval'
/home/vagrant/foreman/app/services/foreman/plugin.rb:64:in `register'
/home/vagrant/foreman-tasks/lib/foreman_tasks/engine.rb:10:in `block in <class:Engine>'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.1.5/lib/rails/initializable.rb:30:in `instance_exec'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.1.5/lib/rails/initializable.rb:30:in `run'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.1.5/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.1.5/lib/rails/initializable.rb:54:in `run_initializers'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.1.5/lib/rails/application.rb:300:in `initialize!'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.1.5/lib/rails/railtie.rb:194:in `public_send'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.1.5/lib/rails/railtie.rb:194:in `method_missing'
/home/vagrant/foreman/config/environment.rb:5:in `<top (required)>'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `block in require'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in `load_dependency'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.1.5/lib/rails/application.rb:276:in `require_environment!'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.1.5/lib/rails/application.rb:379:in `block in run_tasks_blocks'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in `eval'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.