Skip to content
mengfung.com
writing

Ubuntu 10.10, Git 1.7.4.1, Ruby 1.9.2-p180, RubyGems 1.5.2, RVM 1.2.8

 ·  2 min read

Ok assuming you have a vanilla install of Ubuntu 10.10 (Maverick Meerkat) and you want to get it up and running with the lastest versions (as of 02/18/2011).

Check List:

  1. Freshly Installed Ubuntu 10.10
  2. Git 1.7.4.1 [http://kernel.org/pub/software/scm/git/git-1.7.4.1.tar.bz2]
  3. Ruby 1.9.2-p180 [ftp://ftp.ruby-lang.org:21//pub/ruby/1.9/ruby-1.9.2-p180.tar.gz]
  4. RubyGems 1.5.2 [http://production.cf.rubygems.org/rubygems/rubygems-1.5.2.tgz]
  5. RVM 1.2.6* [http://rvm.beginrescueend.com/rvm/install/]
    *Is a little special as the install process just requires you to run a script.

I usually make a Source directory in my Home folder.

mkdir ~/Source && cd Source

Start downloading.

wget http://kernel.org/pub/software/scm/git/git-1.7.4.1.tar.bz2
wget ftp://ftp.ruby-lang.org:21//pub/ruby/1.9/ruby-1.9.2-p180.tar.gz
wget http://production.cf.rubygems.org/rubygems/rubygems-1.5.2.tgz

Extract & Uncompress.

tar -jxvf git-1.7.4.1.tar.bz2
tar -zxvf ruby-1.9.2-p180.tar.gz
tar -zxvf rubygems-1.5.2.tgz

Prep system

sudo apt-get install build-essential bison openssl libreadline5 libreadline5-dev curl zlib1g zlib1g-dev libssl-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libmysqlclient-dev vim

Installing Git.

cd git-1.7.4.1
./configure
sudo make install

Done with Git lets test what version you have, also a good way to see if it installed correctly.

git --version
# should return
# git version 1.7.4.1
which git
# should return
# /usr/local/bin/git

Installing System Ruby we will mostly use RVM Rubies for application dev.
*Unlike OSX you do not need to worry about the path but just in case.*

echo $PATH
# should return or something similar what you care about is /usr/local/bin 
# if you don't have it add it by editing your ~/.profile 
# /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
 
# I added this for those who follow directions exactly
cd ..
 
cd ruby-1.9.2-p180
# should be fine running this
./configure
# old way
# ./configure --enable-shared --enable-pthread CFLAGS=-D_XOPEN_SOURCE=1
 
make
sudo make install

Done with Ruby lets test what we have. If all is well /woot Ruby is installed!

ruby -v
# should return (or something similar to)
# ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux] 
which ruby
# should return
# /usr/local/bin/ruby

Installing RubyGems.

# again for those few
cd ..
 
cd rubygems-1.5.2
sudo /usr/local/bin/ruby setup.rb

Done with RubyGems lets test.

gem -v
# should return
# 1.5.2
 
which gem
# should return
# /usr/local/bin/gem

Installing RVM.

# copy and paste this or type it exactly
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
 
# follow the directions for rvm as it states in the terminal.

To edit ~/.bashrc. Make sure you follow the directions from RVM. And if you don’t know how to use vim, you should learn.

vim ~/.bashrc

Done with RVM lets test.

source ~/.bashrc
rvm -v 
# should return
# rvm 1.2.8 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]
 
which rvm
# should return [your_username] is dynamic to you
# /home/[your_username]/.rvm/bin/rvm

Now you should have everything ready to go. In another post I will go through RVM Rubies and Gemsets and also using .rvmrc so that your terminal will use the correct Rubies and Gemset.