Errors, errors, and more errors.

Rolling Ruby, Rails, etc on a Powerbook (OSX 10.4). I've had a successful install for many months, and then I upgraded Ruby to 1.8.6 and used gem to update Rails to 2.0.2.

Upon install, Rails stopped working and threw a whole series of errors. I updated rubygem and the errors went away (except for one), and rails started working again.

That error: /usr/local/bin/rails:17:Warning: require_gem is obsolete. Use gem instead.

Exciting stuff. But that's not really the issue. When I use gem now, I get this:

Antimatter:~ js$ sudo gem update Updating installed gems... ERROR: While executing gem ... (NoMethodError)     undefined method `refresh' for #<Hash:0x137084c>

I get this error regardless of the command I use for gem (install, update, etc.) I mean, at least rails is working now, but does anybody have any insight as to how I can fix this situation? I haven't done anything particularly wonky... and I have zero clue as to how I can fix this.

Advice is very much appreciated!

My guess is that in config/boot.rb you've got a couple legacy lines that have 'require_gem' in them. Change those to just 'gem' and try again.

Jose Sierra wrote:

Jon Garvin wrote:

My guess is that in config/boot.rb you've got a couple legacy lines that have 'require_gem' in them. Change those to just 'gem' and try again.

-- http://www.5valleys.com/ http://www.workingwithrails.com/person/8078

This also happens when I just type "rails *projectname*"... is there a global configuration that I can modify to take out the legacy lines?

Jose Sierra wrote:

Jon Garvin wrote:

My guess is that in config/boot.rb you've got a couple legacy lines that
have 'require_gem' in them. Change those to just 'gem' and try again.
--
This also happens when I just type "rails *projectname*"... is there a global configuration that I can modify to take out the legacy lines?

Hmmm, “rails projectname” gives me a correct 2.0.2 boot.rb. Try ‘rails -v’ to see what version you get.

Jon Garvin wrote:

Hmmm, "rails projectname" gives me a correct 2.0.2 boot.rb. Try 'rails -v' to see what version you get.

-- http://www.5valleys.com/ http://www.workingwithrails.com/person/8078

Antimatter:~ js$ rails -v /usr/local/bin/rails:17:Warning: require_gem is obsolete. Use gem instead. Rails 2.0.2

Jose Sierra wrote:

Antimatter:~ js$ rails -v /usr/local/bin/rails:17:Warning: require_gem is obsolete. Use gem instead. Rails 2.0.2   

Ok, I wasn't expecting that. I don't think I'm going to be much more help.

Jon Garvin wrote:

  

Ok, I wasn't expecting that. I don't think I'm going to be much more help.

-- http://www.5valleys.com/ http://www.workingwithrails.com/person/8078

LOL, yeah, I'm pretty stymied too...

Whats your gem version? Maybe try sudo gem update - -system,

apremdas wrote:

Whats your gem version?

0.9.2

Maybe try sudo gem update - -system,

Antimatter:~ js$ sudo gem update --system Updating RubyGems... ERROR: While executing gem ... (NoMethodError)     undefined method `refresh' for #<Hash:0x1370568>

Jose Sierra wrote:

apremdas wrote:

Whats your gem version?

0.9.2

Maybe try sudo gem update - -system,

Antimatter:~ js$ sudo gem update --system Updating RubyGems... ERROR: While executing gem ... (NoMethodError)     undefined method `refresh' for #<Hash:0x1370568>

Bump.

Anybody got any ideas?

Maybe try installing latest version of gem from the source. Otherwise I'm out of ideas - hope you get lucky :slight_smile: