jsierra
January 31, 2008, 7:53pm
#1
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!
jsierra
January 31, 2008, 7:59pm
#2
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 S. wrote:
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!
–
http://www.5valleys.com/
http://www.workingwithrails.com/person/8078
jsierra
January 31, 2008, 8:04pm
#3
Jon G. 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?
jsierra
January 31, 2008, 8:22pm
#4
Jon G. 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
jsierra
January 31, 2008, 8:10pm
#5
Jose S. wrote:
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.
–
http://www.5valleys.com/
http://www.workingwithrails.com/person/8078
jsierra
January 31, 2008, 9:16pm
#6
Jon G. 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…
jsierra
January 31, 2008, 10:38pm
#7
Whats your gem version?
Maybe try sudo gem update - -system,
On Jan 31, 8:16 pm, Jose S. [email protected]
jsierra
January 31, 2008, 10:50pm
#8
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
jsierra
January 31, 2008, 8:33pm
#9
Jose S. 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.
–
http://www.5valleys.com/
http://www.workingwithrails.com/person/8078
jsierra
February 1, 2008, 6:18am
#10
Maybe try installing latest version of gem from the source. Otherwise
I’m out of ideas - hope you get lucky
On Jan 31, 9:50 pm, Jose S. [email protected]
jsierra
February 1, 2008, 6:19am
#11
i had a similar problem. i was driven to uninstalling every single gem
and then gems itself. then after reinstall all went well.
On Jan 31, 10:59 pm, Jose S. [email protected]