User does not respond to ‘devise’ method

I’ve recently went back to an old project and it seems to have stopped working giving me this error:

[read full stack trace at: gist]
Since I didn’t really change anything, I was surprised to see it break. So I tried to do what it said, I changed that I had a require statement for my ORM which was Mongoid. I had: (in config/devise.rb)

But that wasn’t working, so I tried to move it to my config/application.rb before the definition:

Doing that it just produced:

[read full stack trace at: gist]
So that wasn’t getting me anywhere.

Since really neither of the errors resulted in any information that could help me, I started looking at what I can do to maybe change the issue. I tried updating the gems like devise and mongoid but that didn’t do anything. Now I wouldn’t recommend people do this but I decided to update my app from Rails 3.0 to Rails 3.2, hoping the issue gets solved with that, plus I knew this app was slated to be updated to 3.2 in the near future anyways. So I did that and it didn’t help at all. I walked away from the app for a few days because I knew pulling my hair out wouldn’t get me anywhere.

Today I looked at the app again and still had no idea what was wrong, but I looked at my Gemfile and noticed that I had  some unneeded gems for Rails 3.2. Gems like jammit, rails-3-generators and active_reload. After running ‘bundle install’ the app booted up without errors! Reinstalled the gems one by one I found out that active_reload was the reason it was happening.

If you’re getting of the errors that I was seeing and you’ve ensured that everything is setup correctly, try removing active_reload and see if that helps!

3 Comments

  1. You just saved my butt on our Rails 3.0 to 3.2 upgrade — active_reload was the trouble. Thanks for blogging this!

  2. Dave Oxtoby

    Brilliant work. I had the same issue when migrating my test database. Turns out it was factory_girl_rails gem that was causing me issues. I have it so that it only gets loaded in the test group which was why only my test database was affected. Simply commenting it out and then running my migration worked fine. Its a little annoying to have to do this but at least there is a pretty painless work around. Thanks!

    • Glad I could help :)

      You might want to notify FactoryGirl team of the issue.
      Also you might want to make sure you’re using the latest version.

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">