The Latest Ruby
Are you brave enough to run the latest version of Ruby from trunk? Well, I do that on my development machine, because a) I lost my mind, or b) I’m the bravest man alive!
Well, all jokes aside, I thought it would be interesting to post how I do it. Obviously, I use Ubuntu to do this, usually in a virtual machine. However, this is not the case for my Lenovo X200. Before you do anything, make sure all the normal tools and libraries such as readline, zlib, ncurses, iconv, and etc are installed, especially the “dev” packages. In addition, run following:
Now that you’re armed and dangerous, let’s install by compiling as we normally do.
Just few notes/caveats:
- I’m assuming that you did not install Ruby yet, because this will override your existing installation.
- If you want to install it elsewhere, then change –prefix=/usr to somewhere else. I usually do “–prefix=/home/{your name}/.rubyhead” and remove “sudo” in make install. Then will change my $PATH.
- You may have to install openssl by “sudo apt-get install libssl-dev”
- Always go to “ext” directory and install each missing/broken extensions.