I’ve been having difficulty with running gem commands with ruby 1.9.x and any version of rubygems. I’ve been using rvm to handle all the installation of ruby and rubygems, but I can’t seem to isolate the issue:
rvm use 1.8.7
Using /home/kelly/.rvm/gems/ruby-1.8.7-p352
which gem
/home/kelly/.rvm/rubies/ruby-1.8.7-p352/bin/gem
gem -v
1.8.10
gem install rails #success!
rvm use 1.9.2
Using /home/kelly/.rvm/gems/ruby-1.9.2-p290
which gem
/home/kelly/.rvm/rubies/ruby-1.9.2-p290/bin/gem
gem -v
1.8.10
gem install rails
ERROR: While executing gem ... (NoMethodError)
undefined method `each' for "http://rubygems.org":String
I’m running a 64-bit Ubuntu 11.04 install. Any pointers?
After editing my
~/.gemrcconfiguration file to specifysourceinstead ofsources, rubygems was able to load my sources as anArrayinstead of aString:before
after