Skip to content

Instantly share code, notes, and snippets.

@anlek
Created February 6, 2012 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anlek/1753047 to your computer and use it in GitHub Desktop.
Save anlek/1753047 to your computer and use it in GitHub Desktop.
Issue faced when trying to run devise and active_reload
#Output when I added the require ORM statement to config/devise.rb
~/projectx/vendor/ruby/1.9.1/gems/devise-2.0.0/lib/devise/rails/routes.rb:391:in `raise_no_devise_method_error!': User does not respond to 'devise' method. This usually means you haven't loaded your ORM file or it's being loaded too late. To fix it, be sure to require 'devise/orm/YOUR_ORM' inside 'config/initializers/devise.rb' or before your application definition in 'config/application.rb' (RuntimeError)
from ~/projectx/vendor/ruby/1.9.1/gems/devise-2.0.0/lib/devise/rails/routes.rb:197:in `block in devise_for'
from ~/projectx/vendor/ruby/1.9.1/gems/devise-2.0.0/lib/devise/rails/routes.rb:193:in `each'
from ~/projectx/vendor/ruby/1.9.1/gems/devise-2.0.0/lib/devise/rails/routes.rb:193:in `devise_for'
from ~/projectx/config/routes.rb:24:in `block in <top (required)>'
from ~/projectx/vendor/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/routing/route_set.rb:272:in `instance_exec'
from ~/projectx/vendor/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/routing/route_set.rb:272:in `eval_block'
from ~/projectx/vendor/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/routing/route_set.rb:249:in `draw'
from ~/projectx/config/routes.rb:1:in `<top (required)>'
from ~/projectx/vendor/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:245:in `load'
from ~/projectx/vendor/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:245:in `block in load'
from ~/projectx/vendor/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
from ~/projectx/vendor/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:245:in `load'
from ~/projectx/vendor/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from ~/projectx/vendor/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application/routes_reloader.rb:40:in `each'
from ~/projectx/vendor/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from ~/projectx/vendor/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application/routes_reloader.rb:16:in `reload!'
from ~/projectx/vendor/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from ~/projectx/vendor/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/file_update_checker.rb:78:in `call'
from ~/projectx/vendor/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/file_update_checker.rb:78:in `execute'
from ~/projectx/vendor/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application/routes_reloader.rb:27:in `updater'
from ~/projectx/vendor/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application/routes_reloader.rb:9:in `rescue in execute_if_updated'
from ~/projectx/vendor/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from ~/projectx/vendor/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application/finisher.rb:66:in `block in <module:Finisher>'
from ~/projectx/vendor/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `instance_exec'
from ~/projectx/vendor/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `run'
from ~/projectx/vendor/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from ~/projectx/vendor/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `each'
from ~/projectx/vendor/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `run_initializers'
from ~/projectx/vendor/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:136:in `initialize!'
from ~/projectx/vendor/ruby/1.9.1/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
from ~/projectx/config/environment.rb:5:in `<top (required)>'
from ~/projectx/vendor/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
from ~/projectx/vendor/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
from ~/projectx/vendor/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
from ~/projectx/vendor/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
from ~/projectx/vendor/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:103:in `require_environment!'
from ~/projectx/vendor/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:25:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
#Output when I added the require ORM statement to config/application.rb
~/projectx/vendor/ruby/1.9.1/gems/orm_adapter-0.0.6/lib/orm_adapter/adapters/mongoid.rb:6:in `<module:ClassMethods>': uninitialized constant Mongoid::Document::ClassMethods::OrmAdapter (NameError)
from ~/projectx/vendor/ruby/1.9.1/gems/orm_adapter-0.0.6/lib/orm_adapter/adapters/mongoid.rb:5:in `<module:Document>'
from ~/projectx/vendor/ruby/1.9.1/gems/orm_adapter-0.0.6/lib/orm_adapter/adapters/mongoid.rb:4:in `<module:Mongoid>'
from ~/projectx/vendor/ruby/1.9.1/gems/orm_adapter-0.0.6/lib/orm_adapter/adapters/mongoid.rb:3:in `<top (required)>'
from ~/projectx/vendor/ruby/1.9.1/gems/devise-2.0.0/lib/devise/orm/mongoid.rb:1:in `require'
from ~/projectx/vendor/ruby/1.9.1/gems/devise-2.0.0/lib/devise/orm/mongoid.rb:1:in `<top (required)>'
from ~/projectx/config/application.rb:9:in `require'
from ~/projectx/config/application.rb:9:in `<top (required)>'
from ~/projectx/vendor/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:24:in `require'
from ~/projectx/vendor/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:24:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment