Installing Ruby on Linode Server
Question
This linode guide provides instructions on how to install ruby on the server. The guide uses ruby 1.8 which is installed alongside other dependencies. How can I alter these commands to setup ruby 1.9.2? The dependencies seem to be linked to each other.
Linode guide's commands:
Install Ruby dependencies
apt-get install wget build-essential ruby1.8 ruby1.8-dev irb1.8 rdoc1.8 zlib1g-dev libopenssl-ruby1.8 rubygems1.8 libopenssl-ruby libzlib-ruby libssl-dev libpcre3-dev libcurl4-openssl-dev
Create symbolic links
ln -s /usr/bin/ruby1.8 /usr/bin/ruby
ln -s /usr/bin/irb1.8 /usr/bin/irb
Solution
RVM is a very popular tool for installing Ruby.
OTHER TIPS
if you want to install ruby 1.9.2 or 1.9.3 I'd recommend using rbenv (http://github.com/sstephenson/rbenv)
For installing on a ubuntu machine the following should work:
curl -L https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash
vim ~/.bashrc # add rbenv to the top
. ~/.bashrc
rbenv bootstrap-ubuntu-10-04
rbenv install 1.9.(your preffered version here)
rbenv global 1.9.(your preffered version here)
I did this just a week or so ago, here's my play-by-play log
# download rvm script
curl -L get.rvm.io > install-rvm
chmod +x install-rvm
sudo ./install-rvm
# add our user into rvm group
usermod -a -G rvm `whoami`
# log out & in
logout
# IMPORTANT: install dependencies given from command below
rvm requirements
apt-get $deps-from-rvm
rvm install 1.9.3 #possibly do this with rvmsudo to install it globally
I know it doesn't directly help your current situation, but using RVM is really recommended in the ruby world. I would back out of your apt-get method and use RVM. The apt-get packages are surely out of date anyway.