Postinstall, rvm(ruby version manager) without roo

2019-08-26 19:58发布

I am trying to use RVM, ("ruby version manager") and after the source installation, I need to add rvm command into my profile.

I added following code to the $HOME/.profile file but it does not seem to work.

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"  # This loads RVM into a shell session.

So I just manually typed below for temporary addition of rvm command, but it does not seem to work. I get Missing name for redirect error like below.

>>source ~/.rvm/scripts/rvm
Missing name for redirect.

How can I resolve this problem? BTW, I do not have root access, and my linux is a redhat system.

1条回答
对你真心纯属浪费
2楼-- · 2019-08-26 20:37

This is a description of how Bash reads its startup files. I think you want to use either ~/.bashrc or ~/.bash_profile.

Once you've added the line to one of those files you'll need to open a new terminal window. Type echo $PATH and you should see RVM's path initialization at the start of it. Type which ruby and it should point to one in your ~/.rvm path. Type rvm list and it should show the Rubies under its control.

Also, be sure to run rvm get head regularly to install the most recent version of rvm as the author updates it often.

查看更多
登录 后发表回答