Update to the latest ruby release from source in Debian Lenny

Wednesday, 17th November 2010

Debian Lenny’s default package included with this distro repository is 1.8.7
Since some ruby project code requires a newer release of ruby as of 1.9.2, I needed to update the ruby version installed on one of the Debian Lenny Linux servers I’m administrating.

I couldn’t find a way to make the ruby update to version 1.9.2 via a deb package thus I proceeded further and installed a ruby 1.9.2 from source into /usr/local/bin

By installing the newer release to /usr/local/bin, I’m not harming the old ruby install and I still keep the advantages of having the newer 1.9.2 installed 🙂

The installation from source comes to this easy steps:

1. Download the latest ruby source in my case this is ruby-1.9.2-p0.tar.bz2

debian:~# cd /usr/local/src
debian:/usr/local/src# wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.bz2
...

2. Dearchive the ruby source package

debian:/usr/local/src# tar -jxvvf ruby-1.9.2-p0.tar.bz2
debian:/usr/local/src# cd ruby-1.9.2-p0

3. Compile the ruby source and install it
debian:/usr/local/src/ruby-1.9.2-p0# make
...
debian:/usr/local/src/ruby-1.9.2-p0# make install

Further on if you need to change your Apache to start using the newer installed version of ruby you will need to set the following variable in /etc/apache2/apaache2.conf

RailsRuby /usr/local/bin/ruby

Share this on:

Download PDFDownload PDF

Tags:

3 Responses to “Update to the latest ruby release from source in Debian Lenny”

  1. wingfire says:
    Firefox 4.0.1 Firefox 4.0.1 Windows 7 x64 Edition Windows 7 x64 Edition
    Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

    Use checkinstall instead of make install. This will generate a debian package you and install and remove as usual.

    View CommentView Comment
    • admin says:
      Epiphany 2.30.6 Epiphany 2.30.6 Debian GNU/Linux x64 Debian GNU/Linux x64
      Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/531.2+ Debian/squeeze (2.30.6-1) Epiphany/2.30.6

      Thanks for the tip wingfire,
      Next time I built it I’ll use checkinstall 🙂

      View CommentView Comment
  2. IGLU.lt says:
    Firefox 3.8 Firefox 3.8 Ubuntu 9.25 Ubuntu 9.25
    Mozilla/5.0 (X11; U; Linux i686; it-IT; rv:1.9.0.2) Gecko/2008092313 Ubuntu/9.25 (jaunty) Firefox/3.8

    Great blog you have here.. It’s hard to find excellent writing like yours these days. I honestly appreciate people like you! Take care!!

    View CommentView Comment

Leave a Reply

CommentLuv badge