plataformatec/devise — Issue #1651: rake db:migrate failure
Author: aL3xa
Created: 2012-02-15 15:03:05+00:00
State: open

Hi guys! After recent update, I'm getting some errors after migrating the database. I did this:

```
rails new foo
rails g controller Pages home profile
rails g devise:install
# set up mailer, routes, flash messages, heroku...
rails g devise Users
```

and got this after migrating:

```
al3xa@quickie ~/rails/foo$ rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
uninitialized constant User
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/inflector/methods.rb:229:in `block in constantize'
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/inflector/methods.rb:228:in `each'
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/inflector/methods.rb:228:in `constantize'
/usr/lib/ruby/gems/1.9.1/gems/devise-2.0.1/lib/devise.rb:289:in `get'
/usr/lib/ruby/gems/1.9.1/gems/devise-2.0.1/lib/devise/mapping.rb:77:in `to'
/usr/lib/ruby/gems/1.9.1/gems/devise-2.0.1/lib/devise/mapping.rb:72:in `modules'
/usr/lib/ruby/gems/1.9.1/gems/devise-2.0.1/lib/devise/mapping.rb:89:in `routes'
/usr/lib/ruby/gems/1.9.1/gems/devise-2.0.1/lib/devise/mapping.rb:156:in `default_used_route'
/usr/lib/ruby/gems/1.9.1/gems/devise-2.0.1/lib/devise/mapping.rb:66:in `initialize'
/usr/lib/ruby/gems/1.9.1/gems/devise-2.0.1/lib/devise.rb:319:in `new'
/usr/lib/ruby/gems/1.9.1/gems/devise-2.0.1/lib/devise.rb:319:in `add_mapping'
/usr/lib/ruby/gems/1.9.1/gems/devise-2.0.1/lib/devise/rails/routes.rb:204:in `block in devise_for'
/usr/lib/ruby/gems/1.9.1/gems/devise-2.0.1/lib/devise/rails/routes.rb:203:in `each'
/usr/lib/ruby/gems/1.9.1/gems/devise-2.0.1/lib/devise/rails/routes.rb:203:in `devise_for'
/home/al3xa/rails/foo/config/routes.rb:2:in `block in '
/usr/lib/ruby/gems/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/routing/route_set.rb:272:in `instance_exec'
/usr/lib/ruby/gems/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/routing/route_set.rb:272:in `eval_block'
/usr/lib/ruby/gems/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/routing/route_set.rb:249:in `draw'
/home/al3xa/rails/foo/config/routes.rb:1:in `'
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application/routes_reloader.rb:40:in `each'
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application/routes_reloader.rb:40:in `load_paths'
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application/routes_reloader.rb:16:in `reload!'
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application/routes_reloader.rb:26:in `block in updater'
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/file_update_checker.rb:78:in `call'
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/file_update_checker.rb:78:in `execute'
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application/routes_reloader.rb:27:in `updater'
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application/finisher.rb:66:in `block in '
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `instance_exec'
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `run'
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `each'
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `run_initializers'
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:136:in `initialize!'
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/al3xa/rails/foo/config/environment.rb:5:in `'
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:103:in `require_environment!'
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:292:in `block (2 levels) in initialize_tasks'
/usr/lib/ruby/1.9.1/rake/task.rb:205:in `call'
/usr/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
/usr/lib/ruby/1.9.1/rake/task.rb:200:in `each'
/usr/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
/usr/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
/usr/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/usr/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/usr/lib/ruby/1.9.1/rake/task.rb:176:in `block in invoke_prerequisites'
/usr/lib/ruby/1.9.1/rake/task.rb:174:in `each'
/usr/lib/ruby/1.9.1/rake/task.rb:174:in `invoke_prerequisites'
/usr/lib/ruby/1.9.1/rake/task.rb:157:in `block in invoke_with_call_chain'
/usr/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/usr/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/usr/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
/usr/lib/ruby/1.9.1/rake/application.rb:116:in `invoke_task'
/usr/lib/ruby/1.9.1/rake/application.rb:94:in `block (2 levels) in top_level'
/usr/lib/ruby/1.9.1/rake/application.rb:94:in `each'
/usr/lib/ruby/1.9.1/rake/application.rb:94:in `block in top_level'
/usr/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/usr/lib/ruby/1.9.1/rake/application.rb:88:in `top_level'
/usr/lib/ruby/1.9.1/rake/application.rb:66:in `block in run'
/usr/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/usr/lib/ruby/1.9.1/rake/application.rb:63:in `run'
/usr/bin/rake:32:in `

'
Tasks: TOP => db:migrate => environment
```

I'm using `devise 2.0.1` on `Rails 3.2.1`.