Reputation: 17321
I am trying to create a gemset. First, I did
$ rvm gemset create rails-1.3.7
mkdir: /usr/local/rvm/gems/[email protected]: Permission denied
Gemset 'rails-1.3.7' does not exist, 'rvm gemset create rails-1.3.7' first, or append '--create'.
Can not create environment file for 'rails-1.3.7', Could not use ruby.
$ sudo rvm gemset create rails-1.3.7
Password:
Can not create gemset before using a ruby. Try 'rvm use <some ruby>'.
$ rvm use 1.9.3
Using /usr/local/rvm/gems/ruby-1.9.3-p194
$ sudo rvm gemset create rails-1.3.7
Can not create gemset before using a ruby. Try 'rvm use <some ruby>'.
$ sudo rvm use 1.9.3
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
You need to change your terminal settings to allow shell login.
Please visit https://rvm.io/workflow/screen/ for example.
Then, accoriding to the answer at https://stackoverflow.com/a/5716654/429850, I did
$ export rvm_gems_path="$HOME/.rvm/gems"
$ rvm gemset create rails-3.1.7
/usr/local/rvm/scripts/functions/environment: line 94: /usr/local/rvm/environments/[email protected]: Permission denied
/usr/local/rvm/scripts/functions/environment: line 105: /usr/local/rvm/environments/[email protected]: Permission denied
/usr/local/rvm/scripts/functions/environment: line 105: /usr/local/rvm/environments/[email protected]: Permission denied
/usr/local/rvm/scripts/functions/environment: line 105: /usr/local/rvm/environments/[email protected]: Permission denied
/usr/local/rvm/scripts/functions/environment: line 105: /usr/local/rvm/environments/[email protected]: Permission denied
/usr/local/rvm/scripts/functions/environment: line 105: /usr/local/rvm/environments/[email protected]: Permission denied
/usr/local/rvm/scripts/functions/environment: line 105: /usr/local/rvm/environments/[email protected]: Permission denied
/usr/local/rvm/scripts/functions/environment: line 105: /usr/local/rvm/environments/[email protected]: Permission denied
/usr/local/rvm/scripts/functions/environment: line 105: /usr/local/rvm/environments/[email protected]: Permission denied
/usr/local/rvm/scripts/functions/environment: line 105: /usr/local/rvm/environments/[email protected]: Permission denied
/usr/local/rvm/scripts/functions/environment: line 107: /usr/local/rvm/environments/[email protected]: Permission denied
/usr/local/rvm/scripts/functions/environment: line 107: /usr/local/rvm/environments/[email protected]: Permission denied
mkdir: /usr/local/rvm/wrappers/[email protected]: Permission denied
How do you create gemsets in a multi-user rvm installation?
Update: After re-starting the computer, and adding myself to the rvm group, I still can't seem to do it:
$ rvm use 1.9.2
Gemset '' does not exist, 'rvm gemset create ' first, or append '--create'.
$ rvm gemset create rails-3.1.7
'rails-3.1.7' gemset created (/Users/yasir/.rvm/gems/[email protected]).
$ rvm use 1.9.2
Gemset '' does not exist, 'rvm gemset create ' first, or append '--create'.
$ rvm rails-3.1.7
Unknown ruby interpreter version: '3.1.7'.
$ rvm 1.9.2
Gemset '' does not exist, 'rvm gemset create ' first, or append '--create'.
$ rvm gemset create 1.9.2
'1.9.2' gemset created (/Users/yasir/.rvm/gems/[email protected]).
$ rvm 1.9.2
Gemset '' does not exist, 'rvm gemset create ' first, or append '--create'.
$ rvm use 1.9.2
Gemset '' does not exist, 'rvm gemset create ' first, or append '--create'.
Upvotes: 2
Views: 3758
Reputation: 18670
For multi-user / system wide installation, you need to add each user that needs access to rvm
to the rvm
group.
Upvotes: 3