Create a RVM gemset in a shared host environment

点点圈 提交于 2020-01-14 05:49:24

问题


Anyone know if there is a configuration variable to tell rvm to create the gemset in my home directory (no root access)?

[p3r66567@cp40 (ruby-1.8.6) ~]$ type rvm | head -1
rvm is a function

[p3r66567@cp40 (ruby-1.8.6) ~]$ which rvm
/usr/local/rvm/bin/rvm

[p3r66567@cp40 (ruby-1.8.6) ~]$ rvm gemset create testgemset
mkdir: cannot create directory `/usr/local/rvm/gems/ruby-1.8.6-p399@testgemset': Permission denied

info: Gemset 'testgemset' created.

回答1:


Add this line:

export rvm_gems_path="$HOME/.rvm/gems" 

to ~/.rvmrc




回答2:


If you installed rvm with root for a multiuser session, and now you are logged in with a different user, make sure that user belongs to the rvm group. If not run this from your root session:

usermod -a -G rvm youruser

Ger



来源:https://stackoverflow.com/questions/5531300/create-a-rvm-gemset-in-a-shared-host-environment

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