Tuesday, June 14, 2011

Rails : no such file to load -- devise/orm

If you're like me, you're getting this error while trying to get Devise set up. You google around and everything talks about mongoid or mongo_mapper, which you're not using.


Turns out the solution to this one is easy. Go into config/initializers/devise.rb and not this section:



# ==> ORM configuratio

# Load and configure the ORM. Supports :active_record (default) an

# :mongoid (bson_ext recommended) by default. Other ORMs may be

# available as additional gems

  require 'devise/orm/'



See it? When I read that I assume it meant that I could leave this alone and get active_record support. Apparently not. Change the line to read : require 'devise/orm/active_record' and see if your problem doesn't go away. Mine did! :)