A computer engineer poking at your cerebral cortex.

Ruby, Rails, and git install on Ubuntu Linux

There are a couple requirements I'm using for my development machine. I'm running Ubuntu Linux 12.04 64 bit and you will need two packages: curl and git.

I use rvm to manage both ruby and rails on my development machines.

sudo apt-get install curl git-core
\curl -L https://get.rvm.io | bash -s stable  --ruby --rails
After the installation completes there are a number of symlinks you should run to make everything the commands work in every directory.

sudo rm /usr/bin/erb; sudo ln -s ~/.rvm/rubies/default/bin/erb /usr/bin/erb
sudo rm /usr/bin/gem; sudo ln -s ~/.rvm/rubies/default/bin/gem /usr/bin/gem
sudo rm /usr/bin/irb; sudo ln -s ~/.rvm/rubies/default/bin/irb /usr/bin/irb
sudo rm /usr/bin/rake; sudo ln -s ~/.rvm/rubies/default/bin/rake /usr/bin/rake
sudo rm /usr/bin/rdoc; sudo ln -s ~/.rvm/rubies/default/bin/rdoc /usr/bin/rdoc
sudo rm /usr/bin/ri; sudo ln -s ~/.rvm/rubies/default/bin/ri /usr/bin/ri
sudo rm /usr/bin/ruby; sudo ln -s ~/.rvm/rubies/default/bin/ruby /usr/bin/ruby
sudo rm /usr/bin/testrb; sudo ln -s ~/.rvm/rubies/default/bin/testrb /usr/bin/testrb
sudo rm /usr/bin/rails; sudo ln -s ~/.rvm/gems/ruby-2.0.0-p0/bin/rails /usr/bin/rails
now edd the following lines to your .bashrc file

PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
source ~/.rvm/scripts/rvm
source ~/.rvm/contrib/ps1_functions
ps1_set --prompt ∴
Now if you load a new tab you will have a prompt that starts with ∴ The prompt will also tell what branch you are on for a git repository. We will work on git later on. So if you see ∴ this your .bashrc file is setup correctly.

A good way to check the versions of all your software:

for command in {erb,gem,irb,rake,rdoc,ri,ruby,testrb,rails}; do $command --version; done
erb.rb [2.1.0 2013-01-26]
2.0.3
irb 0.9.6(09/06/30)
rake, version 10.1.0
rdoc 3.12.2
ri 3.12.2
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]
testrb 4.3.2
Rails 4.0.0