How to solve undefined method `ruby_version’ for Gem:Module (NoMethodError) on OS X
After updating ruby and rb-rubygems with macport I got this error when trying to execute gem:
/opt/local/bin/gem:14: undefined method `ruby_version’ for Gem:Module (NoMethodError)
To solve this issue, edit /opt/local/bin/gem and remove these three lines (just comment them out)
unless required_version.satisfied_by? Gem.ruby_version then
abort “Expected Ruby Version #{required_version}, was #{Gem.ruby_version}”
end
then download rubygems-update-1.2.0.gem and install it.
gem install -l rubygems-update-1.2.0.gem
after the installation is done, start the update
update_rubygems
and you are done!
Technorati Tags: os x, ruby on rails






thx, works on ubuntu hardy too.
the error was similar:
/usr/bin/gem:14: undefined method `ruby_version’ for Gem:Module (NoMethodError)
bmonkeys last blog post..Get Your Firefox Download Day World Record Certificate
Glad I could help