It would appear that the version of Ruby that come with Ubuntu Linux (6.06) does not contain everything you might expect. I installed Ruby on Rails version 1.8 onto my system (which requires Ruby and Ruby Gems) but soon after installing it, a colleague realised that I did not have the Interactive Ruby application irb.
We made several attempts to get an updated version of Ruby 1.8 from the internet but no matter what we tried, the system always reinstalled the same, locally held version. We could not seem to figure out how to tell the system to look on the Internet for updated versions of Ruby (and other packages). I was a less than trivial task getting irb installed but here is how we did it.
- We used the Synaptic Package Manager to install Ruby 1.8 and then followed the instructions on the Ruby on Rails website to install Ruby Gems and Ruby on Rails itself.
- Exited from Synaptic Package Manager and continued from the command-line
- Edit /etc/apt/sources.list and uncomment all entries (save file)
- # apt-get update ;;; updates the package listings on this system
- # apt-get clean ;;; removes old package listings (confusing that this command came after the update command)
- # apt-cache search ruby ;;; Look to see if any new Ruby packages are available
- # apt-get install ruby1.8 ;;; Install Ruby 1.8
- # apt-get install irb1.8 ;;; Install Interactive Ruby 1.8
For some reason, the installer does not create the appropriate symbolic links for ruby and irb so you might have to create these manually.
One final note that the apt-get upgrade command can be used to download and install all available updates for your system. This is the same as clicking the orange “Install Updates” icon at the main console. A system reboot will invariably be requried after this.