Wednesday, October 27, 2021

[SOLVED] RVM "ERROR: Unable to checkout branch ." single-user

Issue

I'm having trouble installing RVM on a new Debian 6 VirtualBox VM. I've installed all the needed packages and downloaded the install script fine using

(curl -s https://rvm.beginrescueend.com/install/rvm) > rvm

, but when running it as a single user

bash rvm

I get the following error message:

ERROR: Unable to checkout branch .

Installation stops here, and (as far as I can tell) none of RVM's files are installed.

If I run the script as root (for a multi-user install), I get the other message:

Successfully checked out branch ''

The installer continues and indiciates success, but .rvm directories are not added and even after modifying my .bash_profile(s), I get 'rvm: command not found'.

I'm really stumped here. I don't have a ton of experience in either bash or with git, so I'm not sure if the fact that 'branch' is blank is the problem, or how to continue debugging. I'm here to learn, so please don't hesitate to ask questions so we can figure this out.

Thanks.


Solution

I had a /etc/rvmrc lying around that was confusing it. The rvm-installer was trying to install into /usr/local and failing. Deleting it fixed it.



Answered By - chrismealy