-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
I get "uninitialized constant Rack::Mongoid" when running rake tasks with Mongoid 2.1.2 (and probably 2.1.x). Someone else apparently has a similar problem(with generators): http://groups.google.com/group/mongoid/browse_thread/thread/776071df8a614a9f
Full trace:
-
- Invoke user:create (first_time)
- Invoke environment (first_time)
- Execute environment
rake aborted!
uninitialized constant Rack::Mongoid
/Some/User/.rvm/gems/ruby-1.9.2-p290/bundler/gems/rails-15e2b5887f21/activesupport/lib/active_support/inflector/methods.rb:124:in `block in constantize'
/Some/User/.rvm/gems/ruby-1.9.2-p290/bundler/gems/rails-15e2b5887f21/activesupport/lib/active_support/inflector/methods.rb:123:in `each'
/Some/User/.rvm/gems/ruby-1.9.2-p290/bundler/gems/rails-15e2b5887f21/activesupport/lib/active_support/inflector/methods.rb:123:in `constantize'
/Some/User/.rvm/gems/ruby-1.9.2-p290/bundler/gems/rails-15e2b5887f21/actionpack/lib/action_dispatch/middleware/stack.rb:14:in `klass'
/Some/User/.rvm/gems/ruby-1.9.2-p290/bundler/gems/rails-15e2b5887f21/actionpack/lib/action_dispatch/middleware/stack.rb:33:in `build'
/Some/User/.rvm/gems/ruby-1.9.2-p290/bundler/gems/rails-15e2b5887f21/actionpack/lib/action_dispatch/middleware/stack.rb:79:in `block in build'
/Some/User/.rvm/gems/ruby-1.9.2-p290/bundler/gems/rails-15e2b5887f21/actionpack/lib/action_dispatch/middleware/stack.rb:79:in `each'
/Some/User/.rvm/gems/ruby-1.9.2-p290/bundler/gems/rails-15e2b5887f21/actionpack/lib/action_dispatch/middleware/stack.rb:79:in `inject'
/Some/User/.rvm/gems/ruby-1.9.2-p290/bundler/gems/rails-15e2b5887f21/actionpack/lib/action_dispatch/middleware/stack.rb:79:in `build'
/Some/User/.rvm/gems/ruby-1.9.2-p290/bundler/gems/rails-15e2b5887f21/railties/lib/rails/application.rb:162:in `app'
/Some/User/.rvm/gems/ruby-1.9.2-p290/bundler/gems/rails-15e2b5887f21/railties/lib/rails/application/finisher.rb:35:in `block in <module:Finisher>'
/Some/User/.rvm/gems/ruby-1.9.2-p290/bundler/gems/rails-15e2b5887f21/railties/lib/rails/initializable.rb:25:in `instance_exec'
/Some/User/.rvm/gems/ruby-1.9.2-p290/bundler/gems/rails-15e2b5887f21/railties/lib/rails/initializable.rb:25:in `run'
/Some/User/.rvm/gems/ruby-1.9.2-p290/bundler/gems/rails-15e2b5887f21/railties/lib/rails/initializable.rb:50:in `block in run_initializers'
/Some/User/.rvm/gems/ruby-1.9.2-p290/bundler/gems/rails-15e2b5887f21/railties/lib/rails/initializable.rb:49:in `each'
/Some/User/.rvm/gems/ruby-1.9.2-p290/bundler/gems/rails-15e2b5887f21/railties/lib/rails/initializable.rb:49:in `run_initializers'
/Some/User/.rvm/gems/ruby-1.9.2-p290/bundler/gems/rails-15e2b5887f21/railties/lib/rails/application.rb:134:in `initialize!'
/Some/User/.rvm/gems/ruby-1.9.2-p290/bundler/gems/rails-15e2b5887f21/railties/lib/rails/application.rb:77:in `method_missing'
/Some/User/Development/someapp/config/environment.rb:5:in `<top (required)>'
/Some/User/.rvm/gems/ruby-1.9.2-p290/bundler/gems/rails-15e2b5887f21/railties/lib/rails/application.rb:103:in `require_environment!'
/Some/User/.rvm/gems/ruby-1.9.2-p290/bundler/gems/rails-15e2b5887f21/railties/lib/rails/application.rb:218:in `block in initialize_tasks'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Some/User/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:174:in `each'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/Some/User/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:90:in `block (2 levels) in top_level'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:90:in `block in top_level'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:62:in `block in run'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Some/User/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/Some/User/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `load'
/Some/User/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `<main>'
Tasks: TOP => user:create => environment