开发者

ruby-1.9.2-head gem usage issues

开发者 https://www.devze.com 2023-02-14 21:24 出处:网络
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 isolat

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 instal开发者_StackOverflowl. Any pointers?


After editing my ~/.gemrc configuration file to specify source instead of sources, rubygems was able to load my sources as an Array instead of a String:

before

---
:backtrace: false
:benchmark: false
:bulk_threshold: 1000
:sources: http://rubygems.org
:update_sources: true
:verbose: true

after

---
:backtrace: false
:benchmark: false
:bulk_threshold: 1000
:source: http://rubygems.org
:update_sources: true
:verbose: true
0

精彩评论

暂无评论...
验证码 换一张
取 消