Thursday, February 15, 2007

Having trouble in installing gems???

Many Rails developers have faced problems installing gems with the updated RubyGems release. solution to this problem is given here...

Problem:

" gem update mysql Updating installed gems… ERROR: While executing gem … (NoMethodError) undefined
method `refresh’ for #"

Solution:

...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
RubyGems Environment:
- VERSION: 0.9.2 (0.9.2)
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
- GEM PATH:
- /usr/local/lib/ruby/gems/1.8
- REMOTE SOURCES:
- http://gems.rubyforge.org

The source_cache file should be in the path labeled by GEM PATH. Removing that file should clear up any related issues.

0 comments: