Compiling Ruby on Ubuntu 6.10 (Edgy) How-to
Here’s a quick and dirty guide for compiling the latest recommended version of Ruby from source on Ubuntu 6.10:
- Download ruby-1.8.5-p12.tar.gz and unzip the contents to a temporary directory I’ll call INSTALL_DIR.
- Make sure you have what you need to compile: sudo apt-get install build-essential
- cd to INSTALL_DIR.
./configure (Update: you can optionally add –prefix=ALTERNATE_INSTALL_DIR)(see update below)
- ./make
- ./make test (hopefully you will get “test succeeded” as a response).
- sudo make install
- now test the install: ruby -v should respond with…
ruby 1.8.5 (2006-12-25 patchlevel 12) [i686-linux]
That’s it!
Next I will document installing Rails on Ubuntu.
Update (2007-01-29): I referred to this post to fix an issue I had with the irb console not working. I had to compile the readline library and recompile ruby. After that, everything worked as expected. I also tried installing to my home directory using the prefix option and never got it to work correctly. In the end, installing using the default paths (/usr/local) worked best.