Installing Ruby 1.8.6 on Ubuntu Feisty Fawn (7.04)

Posted by max on October 04, 2007

Ubuntu seems to be the big distro these days. (Remember all of those other “it” distros? Slackware? The original Red Hat? Mandrake? I am vaguely tired of the trendiness of distros.)

Anyway, there is no package yet for Ruby 1.8.6 on Ubuntu Feisty Fawn (7.04), which is unfortunate, since mongrel_cluster doesn’t work properly under Ruby 1.8.5.

The install steps I got at Urban Puddle (here) were nice, but Rails still wasn’t happy: I kept getting that awful `require’: no such file to load – rubygems (LoadError) error.

Here’s what I did to fix it. YMMV.

Building Ruby (from Urban Puddle):

tar xjvf ruby-1.8.6.tar.bz2
cd ruby-1.8.6
apt-get build-dep ruby1.8
./configure --prefix=/usr
make
sudo make install

Next, to fix it:

cd /usr/src/rubygems/rubygems-0.9.4
sudo ruby setup.rb

Et voilà :

max@somehost:~ $ irb
irb(main):001:0> require 'rubygems'
=> true

I’m not quite sure why the Ruby source doesn’t ship with the rubygems source. Is it because rubygems is still a < 1.0 release?

Popularity: 18% [?]

Theoretically Related Posts
  • How to learn (and not get burned by) LVM
  • Our CV
  • Stupid Job Postings*
  • hah!
  • Trackbacks

    Use this link to trackback from your own site.

    Comments

    Leave a response

    1. Sur Sun, 18 Nov 2007 12:26:40 UTC

      Hi Max,

      Thanks for sharing this useful information. It worked out well.


      sur

    2. Tsutomu Mon, 21 Jan 2008 09:31:40 UTC

      Hello Max,

      Your information helped me a lot. Thank you very much.

    3. blogging in progress :>: RAILS on Ubuntu 7.1 Mon, 25 Feb 2008 11:21:48 UTC

      Kramer auto Pingback[...] Windows platform may not be the ideal place to develop or deploy your Apache/MySQL/PHP or RoR(Ruby on Rails) applications. However I came across few problems myself trying to setup Ruby on Rails Development Machina on Linux (Ubuntu 7.10). Once you fix them, it works like a charmThere are many installation instructions and fixes posted everywhere. I thought of putting my own version to consolidate installation instructions and fixes to possible problems. I’ve also listed the sources I’ve referred myself and its recommended visit those websites if you need more detailed instructions as well as up-to-date news.POSSIBLE ISSUESrubygems (LoadError) require’: no such file to load – rubygems (LoadError)MySql socket error No such file or directory – /tmp/mysql.sockOpen ssl problem when starting Webrick server1. Install libopenssl-ruby1.8 » fixes the Webrick server error on startup2. Install libmysqlclient15-dev » fixes the MySQL sock not found issueReference:https://help.ubuntu.com/community/RubyOnRails3. Install Ruby and GemsEven though you can easily get ruby installed using apt-get it doesn’t fix the issue. We’ll have to compile it ourselves.Reference:http://www.thirdbit.net/articles/2007/10/04/installing-ruby-186-on-ubuntu-feisty-fawn-704/http://www.urbanpuddle.com/articles/2007/08/17/mongrel-cluster-1-0-2-and-ruby-1-8-5http://www.urbanpuddle.com/articles/2008/01/09/install-ruby-on-rails-on-ubutu-gutsy-gibbon-apache-versionDownload rubytar xjvf ruby-1.8.6.tar.bz2cd ruby-1.8.6sudo apt-get build-dep ruby1.8./configure –prefix=/usrmakesudo make installruby -v and if you see something like ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux] ruby is installed :) then we install ruby gems. download rubygems and extract it.cd rubygems-1.0.1sudo ruby setup.rb4. Install RailsReference:http://rubyonrails.com/downhttp://rubyonrails.com/gem install rails –include-dependenciesWe are done.. Worked for me, and fingers crossed it’ll work for anyone as well :) [...]

    4. RAILS on Ubuntu 7.1 | kill3rmedia Thu, 31 Jul 2008 12:48:36 UTC
    Comments