ruby-on-railsrubyrvm

Rvm ruby Permission denied


I have installed rvm for multiuser,

when I am doing bundle install, it is giving me error,

linux:/var/rails_apps$ bundle install
ERROR: RVM Ruby not used, run `rvm use ruby` first.        

linux:/var/rails_apps$ rvm use ruby
mkdir: cannot create directory `/usr/local/rvm/log/ruby-2.0.0-p247': Permission denied

I already did,

sudo chmod 777 /var/rails_apps/

Please suggest..


Solution

  • You have a multiuser installation of rvm - this is not recommended because of the troubles you can get with it (like yours).

    Since you are already there this should fix it:

    rvmsudo rvm get stable --auto-dotfiles
    rvm fix-permissions system
    

    Also make sure you are in rvm group - if not add yourself:

    rvm group add rvm $USER
    

    and log in to a new shell (log out and log back in).