rvm: Permission denied

Getting this error?

$ gem install passenger

Fetching: passenger-4.0.5.gem (100%)

ERROR:  While executing gem … (Gem::FilePermissionError)

    You don’t have write permissions for the /Users/snowcrash/.rvm/gems/ruby-2.0.0-p195 directory.

[scripts (master)]$ ls -ld /Users/snowcrash/.rvm/gems/ruby-2.0.0-p195

drwxrwsr-x  8 root  rvm  272 21 May 16:07 /Users/snowcrash/.rvm/gems/ruby-2.0.0-p195

Changing permissions fixes things:

sudo chown -R <user-here>:<group-here> ~/.rvm/

A StackOverflow discussion on a slightly different aspect:


Leave a Reply

Your email address will not be published. Required fields are marked *