Gem install errors writable and PATH

Deadly 提交于 2019-12-22 12:33:08

问题


These are the two errors I am getting. I am on OS X. Honestly, don't know if I installed via gem or not - if that matters.

WARNING:  Installing to ~/.gem since /Library/Ruby/Gems/1.8 and
  /usr/bin aren't both writable.
WARNING:  You don't have /Users/M/.gem/ruby/1.8/bin in your PATH,
  gem executables will not run.

回答1:


The default Ruby installation shipped on Mac OS X is owned by the system administrator, so you need root privs to install Gems.

$ sudo gem install MYGEM

The second warning is because, without root privileges, Ruby tries to install the Gem in your user directory. However, unless you also installed Ruby in your user directory, you might encounter some problem later.



来源:https://stackoverflow.com/questions/1778703/gem-install-errors-writable-and-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!