开发者

RVM/Rails installation error on ubuntu 11.04

After upgrading to ubuntu 11.04 I am having this problem with rvm. I am following this tutorial: http://ruby.railstutorial.org/ruby-on-rails-tutori开发者_运维百科al-book#top

Git is installed OK, when I follow the instructions on RVM website apparently it's OK too, but when I close my terminal and open a new one and type ruby -v or rvm -v for example I got a message "rvm is not installed".

What should I do?


After some Googling I found: http://ygamretuta.me/2011/05/09/install-rvm-in-ubuntu-11-04-and-mac-osx-snow-leopard/

which worked for me (Ubuntu 11.04, x64)

Edit your .bashrc file instead of your ~/.bash_profile file with your favorite editor

vim .bashrc

add this to the bottom:

if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then source "$HOME/.rvm/scripts/rvm" ; fi

Hope this helps guys!


Check do you have ~/.bash_profile and add next code in it (create file if it does not exists):

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

Also, if you use gnu screen you should add

source ~/.bash_profile

to the end of your ~/.bashrc file.

Then type

type rvm | head -1

in your terminal and you should get message "rvm is a function"

After that you would be able to follow instructions on RailsTutorial.


I recently wrote up a tutorial on getting RVM up and running on Ubuntu 11.04: http://blog.dcxn.com/2011/06/20/setting-up-rvm-on-ubuntu-11-04/

Hopefully it helps if you have future problems or if there are still questions.


I had a similar problem and will list the steps that worked for me:

  1. Following this article was very helpful (even if I have 11.04 installed)
  2. The installation was performed with sudo privileges
  3. The installation didn't added /usr/local/rvm/bin to PATH

Hope this helps to someone

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜