问题
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