Search code examples
rubyrvmosx-mountain-lion

Installing RVM with space in $USER


So I've run into a bit of a problem. I've found many similar problems with spaces in $HOME, but the fixes do not apply to spaces in $USER - so I'm posting a question here.

Due to regulations at work my username for my workstation consists of +space+ (cannot be changed), for instance: John Doe

This is my $USER:

$ echo $USER
john doe

When I try to install rvm I get the following error:

It looks you are one of the happy *space* users(in home dir name),
RVM is not yet fully ready for it, use this trick to fix it:

sudo ln -s "/Users/john doe/.rvm/" /john doe.rvm
echo "export rvm_path=/john doe.rvm" >> "/Users/john doe/.rvmrc"

However, when I try to run the first command I get the following error:

ln: doe.rvm: No such file or directory

And if I attempt to run

sudo ln -s "/Users/john doe/.rvm/" "/john doe.rvm"

I get:

ln: /john doe.rvm: File exists

Any help would be tremendously appreciated :-)

Edit

sudo ln -s "/Users/john doe/.rvm/" /john\ doe.rvm

yields

ln: /john doe.rvm: File exists

Edit 2

Okay, thanks to platzhirsch I no longer get an error message when running the ln command. Now the problem is following:

When I run

echo "export rvm_path=/john\ doe.rvm" >> "/Users/john doe/.rvmrc"

or

echo "export rvm_path="/john doe.rvm"" >> "/Users/john doe/.rvmrc"

I get the following error when trying to re-install:

usage: dirname path

Edit 3

I've also tried manually editing the .rvmrc file. This is what it looks like:

export rvm_path="/john doe.rvm"

I've also tried

export rvm_path=/john\ doe.rvm

With no luck, I still get:

usage: dirname path

When I try to run

\curl -L https://get.rvm.io | bash -s stable --ruby

Solution

  • this message is fixed with https://github.com/wayneeseguin/rvm/issues/2140 - just start again and now it will propose the directory with _ (underscore) instead of (space)