Question

rvm is not working

  • Posted August 24, 2013

New Digital Ocean customer here. Need some rvm help. This is what I’ve done so far:

  • 1-Click Install Ruby on Rails on Ubuntu 12.10.
  • Initial Server Setup with Ubuntu 12.04.

From my home directory /home/ltrainpr I type rvm install 2.0.0 and get this error: mkdir: cannot create directory `/usr/local/rvm/log/ruby-2.0.0-p195’: Permission denied Could not detect ruby version/name for installation, please be more specific.

I tried rvmsudo install 2.0.0 and get this error: Warning: can not check /etc/sudoers for secure_path, falling back to call via /usr/bin/env, this breaks rules from /etc/sudoers. Run:

export rvmsudo_secure_path=1

to avoid the warning, put it in shell initialization file to make it persistent.

In case there is no secure_path in /etc/sudoers. Run:

export rvmsudo_secure_path=0

to avoid the warning, put it in shell initialization file to make it persistent. [sudo] password for ltrainpr: install: missing destination file operand after 2.0.0' Try install --help’ for more information.

I tried the command: rvm use ruby 2.0.0-p195 --default and got this error: mkdir: cannot create directory `/usr/local/rvm/log/ruby-2.0.0-p195’: Permission denied

Tried rvmsudo use ruby 2.0.0-p195 --default and got this error: /usr/bin/env: use: No such file or directory

When I do rvm list, I get: rvm rubies

=* ruby-1.9.3-p429 [ x86_64 ]

=> - current

=* - current && default

* - default

When I run sudo I get: sudo: rvm: command not found

I would like to use ruby 2.0.0 with rvm. What do I need to do? What am I missing? rvm file is under usr/local/rvm

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I’m not very familiar with ruby/rvm so I suggest creating a one-click ruby installation droplet and <strong>sticking to the defaults</strong> (e.g. renaming a home dir is <em>bad</em>).

The image is already set up with a ‘rails’ user – it’s recommended that you use that user instead. <br> <br>If you still want to use the ‘ltrainpr’ user, run these commands as root: <br> <br><pre>usermod -a -G sudo ltrainpr <br>usermod -s /bin/bash ltrainpr</pre> <br> <br>Then log in as ltrainpr and run this command: <br> <br><pre>/bin/bash --login</pre> <br> <br>It’ll spawn a login shell, once you’re inside, run these commands: <br> <br><pre>sudo /usr/local/rvm/bin/rvm get stable <br>sudo /usr/local/rvm/bin/rvm install 2.0.0 <br>rvm requirements <br>rvm use --default 2.0.0</pre> <br> <br>That should fix it. :]