Why do “gem” and “sudo gem” have different installation directories?

☆樱花仙子☆ 提交于 2019-11-30 10:14:34

RVM uses environment variables to configure rubygems - the gem command, basically if you have user installation (~/.rvm) you should not need to use to call any commands with sudo, especially gem - that if worked would install rail as root user in your home directory, making it impossible for you to manage your files ... if you have any good reasons to use sudo - use rvmsudo instead - but really you should not have that need, especially to install gems.

If you want to have some commands available in your system (like gist) you can use rvm wrapper and link generated binary in /usr/bin

to fix permissions in your home:

sudo chown $USER: ~/.rvm
sudo chmod u+rw ~/.rvm
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!