Tuesday, November 2, 2010

Ubuntu 10.04 upgrade on Toshiba Satellite: Ruby Version Manager

Previous: Ubuntu 10.04 upgrade on Toshiba Satellite: Skype

Installation of rvm went pretty smoothly after the practice I got installing it on the Acer netbook. First step was to install prerequisites:
sudo apt-get install
curl
git-core
build-essential
zlib1g-dev
libssl-dev
libreadline5-dev
Next step was to run curl to do the basic install of rvm:
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
Then I edited .bashrc and commented out the line
[ -z "$PS1" ] && return
I noticed I had made a mistake when adding the source line to .bashrc on the Acer. The line should be
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
After that, I executed .bashrc like this
. ./.bashrc
and when I ran
type rvm | head -n1
I got the response
rvm is a function
just as the original instructions said to expect.

Next I ran
rvm install 1.9.2
and it downloaded and installed ruby 1.9.2 and rubygems 1.3.7.

At this point ruby -v said "The program 'ruby' is currently not installed". After I ran
rvm --default 1.9.2
then ruby -v said "ruby 1.9.2p0..." and gem -v said "1.3.7".

I uncommented the line
[ -z "$PS1" ] && return
in .bashrc to see if my guess was right about reinstating it after rvm had been used once. I closed the Terminal window and opened a new one, and ruby -v still worked. I logged out and in again, and ruby -v still worked.

Next: Ubuntu 10.04 upgrade on Toshiba Satellite: Instiki wiki

No comments:

Post a Comment