Sep
4
Rails and undefined method ‘manage_gems’
September 4, 2009 | 2 Comments
Going through the update process today on a site built over a year ago. It had an older version of Rails frozen and I was simply trying to update to a newer version of the gem.
Issuing the rake rails:freeze:gems command didn’t work. Got the following:
rake aborted!
undefined method `manage_gems’ for Gem:Module
I knew I had updated RubyGems. That wasn’t it.
gem env
Shows the gem environment variables. Sure enough I was up to date. So what was causing the old method to be called? I looked in the boot.rb file for anything suspicious. There are some differences between an older version of Rails’ boot file and newer versions. Replaced it. No dice. It was still something to do with this app because other apps could freeze the gem.
It hit me. Unfreeze the older version completely and try again.
rake rails:unfreeze
Removing the old version worked. Not sure what was in there. But regardless, I was able to freeze to the new 2.3.4 version with the security patches. Hope this helps someone else before they go down the road of blaming RubyGems or soemthing.