【发布时间】:2013-08-21 17:23:29
【问题描述】:
我uninstalled RVM 并使用single user installation 重新安装:
\curl -L https://get.rvm.io | bash -s stable
当我执行bundle 时,它会提示:
Enter your password to install the bundled RubyGems to your system:
我尝试使用“ERROR: While executing gem … (Gem::FilePermissionError)”中的答案,但没有解决。
然后,在尝试手动安装 gem 时,我得到了:
Gem::InstallError: nokogiri requires Ruby version >= 1.9.2.
An error occurred while installing nokogiri (1.6.0), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.0'` succeeds before bundling.
然后运行 gem install nokogiri -v '1.6.0' 返回:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /Library/Ruby/Gems/1.8 directory.
我检查了 SO 上所有类似的帖子,但他们没有解决问题。我错过了什么?
【问题讨论】:
-
从您的错误消息中(nokogiri 需要 Ruby 版本 >= 1.9.2。)您有一个较旧的 Ruby 版本。检查您的 Ruby 版本。
-
谢谢,这帮助我解决了问题!更新 ruby 版本后,我不得不做一些手动 gem 安装。把它写成答案,我会接受。
标签: ruby permissions gem rvm bundler