安装 ruby​​racer 时出错,出现错误“无效的 gem:包已损坏" [英] Error install rubyracer with error "invalid gem: package is corrupt"

查看:10
本文介绍了安装 ruby​​racer 时出错,出现错误“无效的 gem:包已损坏"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试在 OSX 10.9 上安装 therubyracer 时,使用以下命令:

When trying to install therubyracer on OSX 10.9, with the command:

$ gem install therubyracer -v '0.12.0'

我得到错误:

ERROR:  Error installing therubyracer:
    invalid gem: package is corrupt, exception while verifying: undefined method `path2class' for #<Psych::ClassLoader:0x000001018cf210> (NoMethodError) in /Users/doved/.rvm/gems/ruby-2.0.0-p353/cache/therubyracer-0.12.0.gem

XCode 开发者工具已安装,我已尝试删除缓存文件,但仍然出现错误.

XCode developer tools are installed, and I've tried removing the cache file, but I still get the error.

推荐答案

删除/Users/doved/.rvm/gems/ruby-2.0.0-p353/cache/therubyracer-0.12.0.gem 并重新安装 gem.RubyGems 未正确下载文件,系统正确报告 gem 已损坏.

Delete /Users/doved/.rvm/gems/ruby-2.0.0-p353/cache/therubyracer-0.12.0.gem and install the gem again. RubyGems didn't download the file properly, and the system is properly reporting that the gem is corrupted.

这篇关于安装 ruby​​racer 时出错,出现错误“无效的 gem:包已损坏"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆