19
votes

I followed the instructions from the RVM homepage (https://rvm.beginrescueend.com/rvm/install/)

I typed the following:

sudo bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )

the script executed and didn't seem to give any errors.

the same without sudo gave an error:

Warning: Failed to create the file 
Warning: /usr/share/ruby-rvm/archives/wayneeseguin-rvm-stable.tgz: Permission 
Warning: denied
  0  792k    0  3908    0     0   2257      0  0:05:59  0:00:01  0:05:58  2257
curl: (23) Failed writing body (0 != 3908)

Could not download 'https://github.com/wayneeseguin/rvm/tarball/stable'.
  curl returned status '23'.

I also put this in my ~/.bashrc

echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"

what I get is:

~$ type rvm | head -1
bash: type: rvm: not found

~$ source "/usr/local/rvm/scripts/rvm"
bash: /usr/local/rvm/scripts/rvm: No such file or directory

~$ source "$HOME/.rvm/scripts/rvm"
bash: /home/anonym/.rvm/scripts/rvm: No such file or directory

How can this be fixed?

PS

I'm using Ubuntu 11.10

8
Did you try reloading your session after changing your .bashrc? To do that, use source ~/.bashrc or open new terminal window.Sergio Tulentsev
Are you trying to install RVM for your own personal development, or as a system administrator for all users on a shared host? Unless you are a system admin doing it for everyone, you should use the single user installation, per RVM's install page.the Tin Man
i got this because i'm behind a proxy.ftravers

8 Answers

32
votes

Sudo problems. This worked for me to install rvm. Just do:

curl -L https://get.rvm.io | sudo bash -s stable --ruby
16
votes
nano ~/.bashrc

at the bottom of the file add these line

unset rvm_path
unset GEM_HOME

Then run

curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.3
rvm use 2.1.3 --default
ruby -v
12
votes

Can you try this:

$ curl -s raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer | bash -s stable

or

$ curl -s raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer | sudo bash -s stable

depending on your permissions. That should help. It helped me! :)

6
votes

I'm sure there's a more elegant way to fix this, but I ran into the same issue and was kinda in a hurry, so I went for a quick and dirty workaround:

$ curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer > foo.sh
$ chmod 755 foo.sh

Then edit line 162, and add -k to the curl command:

$ vim foo.sh
162 if curl -Lk https://github.com/${_repo}/rvm/tarball/${_branch} -o ${rvm_archives_path}/${_repo}-rvm-${_branch}.tgz

Then run the script:

$ ./foo.sh --branch stable

Like I said, not ideal, but it got me where I needed to be quickly.

2
votes

If anyone has this problem in the future in ubuntu I was getting this error because of an old package that still had config stuff hanging around.

Try running

sudo apt-get --purge remove ruby-rvm

That should take care of the permission error and let you install RVM as a normal user under $HOME/.rvm

1
votes

Put this in your .bashrc instead (without echo)

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

And restart your terminal.

1
votes

You might have RVM installed under the wrong user. RVM won't let you install if it's installed under another user.

You can uninstall it from the other user with rvm implode.

Log over to the other user and RVM will install correctly!

0
votes

https://rvm.io/rvm/security#ipv6-issues You can forbid gpg's internal dirmngr from using IPv6 by add the following line to ~/.gnupg/dirmngr.conf: