TL;博士:
$ gem install rubyzip
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /Users/darth/.rvm/gems/ruby-1.9.2-p136/gems/rubyzip-0.9.4/README
现在详细说明。我不确定哪些信息是相关的,所以我只想说出来。
- 我最近从 OS X Snow Leopard 升级到了 Lion(也将 Xcode 升级到了 4.2)
- 一切工作正常了一段时间
- 今天我决定安装一些 gem(RSpec、Cucumber),每当我对 RubyGems 进行任何操作时,我都会收到日期格式警告
- 我决定将 RubyGems 从 1.3.6(我不确定)更新到当前的 1.8.11
- 警告不断弹出,因此我尝试使用 删除 gemset,但由于某些权限被拒绝错误,该 gemset也
rvm gemset empty
失败了(是的,愚蠢的我没有写下来) - 结果,我通过and重新安装了 Ruby(在那之后我没有忘记。
rvm remove 1.9.2
rvm install 1.9.2
rvm use 1.9.2 --default
我安装了 bundler
gem install bundle
,然后尝试bundle install
在我的 Rails 3.1.1 项目中安装,但它以错误结束Installing rubyzip (0.9.4) Errno::EPERM: Operation not permitted - /Users/darth/.rvm/gems/ruby-1.9.2-p136/gems/rubyzip-0.9.4/README An error occured while installing rubyzip (0.9.4), and Bundler cannot continue. Make sure that `gem install rubyzip -v '0.9.4'` succeeds before bundling.
gem install rubyzip -v '0.9.4'
给出上述错误README 文件说要通过 下载源代码并从那里安装
ruby install.rb
,这也以错误结尾$ ruby install.rb /Users/darth/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/fileutils.rb:841:in `install': wrong number of arguments (4 for 3) (ArgumentError) from install.rb:21:in `block in <main>' from install.rb:18:in `each' from install.rb:18:in `<main>'
即使从 rubyzip 执行测试也会导致一堆错误
$ rake test rake/gempackagetask is deprecated. Use rubygems/package_task instead rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+) /Users/darth/.rvm/rubies/ruby-1.9.2-p136/bin/ruby -C test alltests.rb <internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- stdrubyexttest (LoadError) from <internal:lib/rubygems/custom_require>:29:in `require' from alltests.rb:5:in `<main>' rake aborted! Command failed with status (1): [/Users/darth/.rvm/rubies/ruby-1.9.2-p136/b...] Tasks: TOP => test (See full trace by running task with --trace)
我没有想法,我该怎么办?