安装gem失败并出现权限错误 [英] Installing gem fails with permissions error
问题描述
我昨天将我的Mac OS升级到10.9小牛。我当前的Ruby版本显示为
ruby 2.0.0p247(2013-06-27 revision 41674)[universal.x86_64-darwin13] p>
我在我的机器上安装了Rails,当我尝试安装宝石时,收到以下消息:
获取:eventmachine-1.0.3.gem(100%)
错误:执行gem时(Gem :: FilePermissionError)
You don没有写入/Library/Ruby/Gems/2.0.0目录的权限。
我正在尝试所有这些在我的主目录中。任何建议?
我不能说rbenv,但是RVM在你的 rbenv同样适用于您的 I updated my Mac OS to 10.9 Mavericks yesterday. My current Ruby version shows as ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13] I got Rails installed on my machine and when I try to install gems I get the following message: I am trying all this in my home directory. Any suggestions? Use a Ruby version manager, like RVM or rbenv. I can't speak for rbenv, but RVM prepends a Ruby version-specific rbenv similarly prepends to your 这篇关于安装gem失败并出现权限错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! PATH $ c之前加了一个Ruby特定于版本的
bin
你可以使用$ c>,所以你不必使用 sudo
(这是你如何在当前情况下安装gem,但是非常不鼓励)。
$ PATH
,但它使用垫片。
Fetching: eventmachine-1.0.3.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
bin
to your PATH
that you have access to, so you don't have to use sudo
(which is how you could install gems in your current situation, but is highly discouraged).$PATH
, but it uses a shim.