A significant number of Rails developers have reported problems installing gems with the updated RubyGems release. If you’re experiencing a problem that looks anything like this:
$ gem update sqlite3-ruby Updating installed gems… ERROR: While executing gem … (NoMethodError) undefined
method `refresh’ for #<hash:0x14e0a4c>
…you should remove your local source_cache file. This is the file that locally caches any gem metadata from the gem server to avoid having to re-download it every time you execute a gem command.
To discover the location of this file on your system, run the following command:
$ gem env
- VERSION: 0.9.2 (0.9.2)
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
- GEM PATH:
- REMOTE SOURCES:
The source_cache file should be in the path labeled by GEM PATH. Removing that file should clear up any related issues.
This solution is a workaround pending a fix by the RubyGems team.