加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

通过rvm升级rubygems的问题

发布时间:2020-12-17 03:35:11 所属栏目:百科 来源:网络整理
导读:尝试通过RVM将 RubyGems升级到版本1.8.10并出现此错误: $rvm rubygems latestRemoving old Rubygems files...Installing rubygems-1.8.10 for ruby-1.9.2-p180 ...ERROR: Error running 'GEM_PATH="/Users/foo/.rvm/gems/ruby-1.9.2-p180:/Users/foo/.rvm/g
尝试通过RVM将 RubyGems升级到版本1.8.10并出现此错误:

$rvm rubygems latest
Removing old Rubygems files...
Installing rubygems-1.8.10 for ruby-1.9.2-p180 ...
ERROR: Error running 'GEM_PATH="/Users/foo/.rvm/gems/ruby-1.9.2-p180:/Users/foo/.rvm/gems/ruby-1.9.2-p180@global:/Users/foo/.rvm/gems/ruby-1.9.2-p180:/Users/foo/.rvm/gems/ruby-1.9.2-p180@global" GEM_HOME="/Users/foo/.rvm/gems/ruby-1.9.2-p180" "/Users/foo/.rvm/rubies/ruby-1.9.2-p180/bin/ruby" "/Users/foo/.rvm/src/rubygems-1.8.10/setup.rb"',please read /Users/foo/.rvm/log/ruby-1.9.2-p180/rubygems.install.log
WARN: Installation of rubygems did not complete successfully.

检查日志文件(rubygems.install.log)时,这是从安装生成的:

[2011-09-27 21:16:57] GEM_PATH="/Users/foo/.rvm/gems/ruby-1.9.2-
p180:/Users/foo/.rvm/gems/ruby-1.9.2-p180@global:/Users/foo/.rvm/gems/ruby-1.9.2-p180:/Users/foo/.rvm/gems/ruby-1.9.2-p180@global" GEM_HOME="/Users/foo/.rvm/gems/ruby-1.9.2-p180" "/Users/foo/.rvm/rubies/ruby-1.9.2-p180/bin/ruby" "/Users/foo/.rvm/src/rubygems-1.8.10/setup.rb"
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package/f_sync_dir.rb,skipping
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package/tar_header.rb,skipping
unable to convert U+00E1 to US-ASCII in conversion from ISO-8859-1 to UTF-8 to US-ASCII for lib/rubygems/package/tar_input.rb,skipping
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package/tar_output.rb,skipping
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package/tar_reader/entry.rb,skipping
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package/tar_reader.rb,skipping
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package/tar_writer.rb,skipping
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package.rb,skipping
unable to convert U+0160 from UTF-8 to US-ASCII for History.txt,skipping
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package/f_sync_dir.rb,skipping
ERROR:  While executing gem ... (RDoc::Error)
    error generating index.html: Error while evaluating /Users/foo/.rvm/gems/ruby-1.9.2-p180/gems/rdoc-3.9/lib/rdoc/generator/template/darkfish/index.rhtml: undefined method `[]' for nil:NilClass (RDoc::Error)
RubyGems 1.8.10 installed

有没有人知道更新可能出现什么问题?试图通过RVM也删除rubygems,然后再次运行更新,但没有运气.

更新:似乎rvm无法运行Ruby 1.9.2.

$rvm use 1.9.2 WARN: ruby ruby-1.9.2-p290 is not installed. To install do: 'rvm install ruby-1.9.2-p290'

因此在安装1.9.2-p290后,rubygems的安装成功完成.

$rvm use 1.9.2
Using /Users/foo/.rvm/gems/ruby-1.9.2-p290

$rvm rubygems latest
Removing old Rubygems files...
Installing rubygems-1.8.10 for ruby-1.9.2-p290 ...
Installation of rubygems completed successfully.

这对我有用.

解决方法

好像rvm无法运行Ruby 1.9.2.

$rvm use 1.9.2 
WARN: ruby ruby-1.9.2-p290 is not installed. To install do: 'rvm install ruby-1.9.2-p290'

因此在安装1.9.2-p290后,rubygems的安装成功完成.

$rvm use 1.9.2
Using /Users/foo/.rvm/gems/ruby-1.9.2-p290

$rvm rubygems latest
Removing old Rubygems files...
Installing rubygems-1.8.10 for ruby-1.9.2-p290 ...
Installation of rubygems completed successfully.

这对我有用.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读