Accidental Technologist

Musings about Entrepreneurship, Technology and Software Development

  • Home
  • About
  • Still River Software
  • Privacy Policy

Powered by Genesis

You are here: Home / Ruby / Installing Ruby 1.8.6 on Ubuntu 8.10

Installing Ruby 1.8.6 on Ubuntu 8.10

November 29, 2008 by Rob Bazinet

Tweet

ubuntulogo I recently installed the latest release of Ubuntu, 8.10.  I wanted to setup my Dell Mini to do some on-the-road Ruby development so I tried:

$ sudo apt-get install ruby

Only to find out the Ruby default for Ubuntu 8.10 is Ruby 1.8.7 which is known to have some compatibility problems with pre-Rails 2.2.2 and other Ruby gems and plugins.  After removing Ruby 1.8.7 I set out to figure out the best way to get my old friend Ruby 1.8.6 up and running.  ruby-logo

It’s about the source

It turns out we can pretty easily set the source of where Ubuntu gets it’s updates regardless of the version.  Even though I have Ubuntu 8.10 installed, I can install packages from Ubuntu 8.04. 

Getting started is pretty easy.  The file we need to change is the sources.list file located in /etc/apt/.  After backing up the file I changed the file to access the older Hardy file repositories alongside the newer Intrepid (8.10) versions.  The sources.list file now looks like this:

# deb cdrom:[Ubuntu 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/ gutsy main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
# Line commented out by installer because it failed to verify:
deb http://mirror.cs.umn.edu/ubuntu/ intrepid main restricted
deb http://mirror.cs.umn.edu/ubuntu/ hardy main restricted
# Line commented out by installer because it failed to verify:
deb-src http://mirror.cs.umn.edu/ubuntu/ intrepid main restricted
deb-src http://mirror.cs.umn.edu/ubuntu/ hardy main restricted
## Major bug fix updates produced after the final release of the
## distribution.
# Line commented out by installer because it failed to verify:
deb http://mirror.cs.umn.edu/ubuntu/ intrepid-updates main restricted
deb http://mirror.cs.umn.edu/ubuntu/ hardy-updates main restricted
# Line commented out by installer because it failed to verify:
deb-src http://mirror.cs.umn.edu/ubuntu/ intrepid-updates main restricted
deb-src http://mirror.cs.umn.edu/ubuntu/ hardy-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# Line commented out by installer because it failed to verify:
deb http://mirror.cs.umn.edu/ubuntu/ intrepid universe
deb http://mirror.cs.umn.edu/ubuntu/ hardy universe
# Line commented out by installer because it failed to verify:
deb-src http://mirror.cs.umn.edu/ubuntu/ intrepid universe
deb-src http://mirror.cs.umn.edu/ubuntu/ hardy universe
# Line commented out by installer because it failed to verify:
deb http://mirror.cs.umn.edu/ubuntu/ intrepid-updates universe
deb http://mirror.cs.umn.edu/ubuntu/ hardy-updates universe
# Line commented out by installer because it failed to verify:
deb-src http://mirror.cs.umn.edu/ubuntu/ intrepid-updates universe
deb-src http://mirror.cs.umn.edu/ubuntu/ hardy-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
# Line commented out by installer because it failed to verify:
deb http://mirror.cs.umn.edu/ubuntu/ intrepid multiverse
deb http://mirror.cs.umn.edu/ubuntu/ hardy multiverse
# Line commented out by installer because it failed to verify:
deb-src http://mirror.cs.umn.edu/ubuntu/ hardy multiverse
deb-src http://mirror.cs.umn.edu/ubuntu/ intrepid multiverse
# Line commented out by installer because it failed to verify:
deb http://mirror.cs.umn.edu/ubuntu/ intrepid-updates multiverse
deb http://mirror.cs.umn.edu/ubuntu/ hardy-updates multiverse
# Line commented out by installer because it failed to verify:
deb-src http://mirror.cs.umn.edu/ubuntu/ intrepid-updates multiverse
deb-src http://mirror.cs.umn.edu/ubuntu/ hardy-updates multiverse
## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://mirror.cs.umn.edu/ubuntu/ intrepid-backports main restricted universe multiverse
deb http://mirror.cs.umn.edu/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://mirror.cs.umn.edu/ubuntu/ intrepid-backports main restricted universe multiverse
deb-src http://mirror.cs.umn.edu/ubuntu/ hardy-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository. This software is not part of Ubuntu, but is
## offered by Canonical and the respective vendors as a service to Ubuntu
## users.
deb http://archive.canonical.com/ubuntu intrepid partner
deb http://archive.canonical.com/ubuntu hardy partner
deb-src http://archive.canonical.com/ubuntu intrepid partner
deb-src http://archive.canonical.com/ubuntu hardy partner
# Line commented out by installer because it failed to verify:
deb http://mirror.cs.umn.edu/ubuntu/ intrepid-security main restricted
deb http://mirror.cs.umn.edu/ubuntu/ hardy-security main restricted
# Line commented out by installer because it failed to verify:
deb-src http://mirror.cs.umn.edu/ubuntu/ intrepid-security main restricted
deb-src http://mirror.cs.umn.edu/ubuntu/ hardy-security main restricted
# Line commented out by installer because it failed to verify:
deb http://mirror.cs.umn.edu/ubuntu/ intrepid-security universe
deb http://mirror.cs.umn.edu/ubuntu/ hardy-security universe
# Line commented out by installer because it failed to verify:
deb-src http://mirror.cs.umn.edu/ubuntu/ intrepid-security universe
deb-src http://mirror.cs.umn.edu/ubuntu/ hardy-security universe
# Line commented out by installer because it failed to verify:
deb http://mirror.cs.umn.edu/ubuntu/ intrepid-security multiverse
deb http://mirror.cs.umn.edu/ubuntu/ hardy-security multiverse
# Line commented out by installer because it failed to verify:
deb-src http://mirror.cs.umn.edu/ubuntu/ intrepid-security multiverse
deb-src http://mirror.cs.umn.edu/ubuntu/ hardy-security multiverse

Next up we need to create a file to tell the package manager our preferences for various packages that we might try to install.  The file is /etc/apt/preferences and contain the following:

Package: ruby
Pin: release a=hardy
Pin-Priority: 900
Package: ruby1.8
Pin: release a=hardy
Pin-Priority: 900
Package: libruby1.8
Pin: release a=hardy
Pin-Priority: 900
Package: rdoc1.8
Pin: release a=hardy
Pin-Priority: 900
Package: ri1.8
Pin: release a=hardy
Pin-Priority: 900
Package: libgtk2-ruby1.8
Pin: release a=hardy
Pin-Priority: 900
Package: libdbd-sqlite3-ruby1.8
Pin: release a=hardy
Pin-Priority: 900
Package: libopenssl-ruby1.8
Pin: release a=hardy
Pin-Priority: 900
Package: libsqlite3-ruby1.8
Pin: release a=hardy
Pin-Priority: 900
Package: ruby1.8-dev
Pin: release a=hardy
Pin-Priority: 900
Package: libdbi-ruby1.8
Pin: release a=hardy
Pin-Priority: 900
Package: libatk1-ruby1.8
Pin: release a=hardy
Pin-Priority: 900
Package: libpango1-ruby1.8
Pin: release a=hardy
Pin-Priority: 900
Package: libatk1-ruby1.8
Pin: release a=hardy
Pin-Priority: 900
Package: libgdk-pixbuf2-ruby1.8
Pin: release a=hardy
Pin-Priority: 900
Package: libglib2-ruby1.8
Pin: release a=hardy
Pin-Priority: 900
Package: libcairo-ruby1.8
Pin: release a=hardy
Pin-Priority: 900
Package: irb1.8
Pin: release a=hardy
Pin-Priority: 900
Package: libreadline-ruby1.8
Pin: release a=hardy
Pin-Priority: 900
Package: rails
Pin: release a=hardy
Pin-Priority: 900
Package: libncurses-ruby1.8
Pin: release a=hardy
Pin-Priority: 900

Once the file is in place a quick sudo apt-get update will make sure the repositories are up-to-date.  Now our install of Ruby:

sudo aptitude install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8 libopenssl-ruby sqlite3 libsqlite3-ruby1.8

and it will be what we expect, 1.8.6.

Technorati Tags: Ubuntu,Ruby

Share this:

  • LinkedIn
  • Twitter
  • Facebook
  • Email
  • More
  • Pinterest
  • Tumblr
  • Pocket
  • Reddit

Related

Filed Under: Ruby

Care about your privacy? I do and use Fathom Analytics on this site.

Fathom Analytics

Comments

  1. Jeff says

    December 3, 2008 at 8:03 pm

    Awesome – I think I’ll be trying this out this weekend, as I have an app on 8.10 that’s running into weird problems even though it was working fine on 8.04.

  2. Jeff says

    December 3, 2008 at 8:03 pm

    Awesome – I think I’ll be trying this out this weekend, as I have an app on 8.10 that’s running into weird problems even though it was working fine on 8.04.

  3. Rob Bazinet says

    December 3, 2008 at 9:59 pm

    @jeff When I saw your Tweet about Ubuntu 8.10 and Ruby 1.8.7, I wondered if you were going to have issues. I bypassed 1.8.7 altogether just for the sanity.
    Let me know how it goes.

  4. Rob Bazinet says

    December 3, 2008 at 9:59 pm

    @jeff When I saw your Tweet about Ubuntu 8.10 and Ruby 1.8.7, I wondered if you were going to have issues. I bypassed 1.8.7 altogether just for the sanity.

    Let me know how it goes.

  5. Mikhailov Anatoly says

    December 15, 2008 at 1:46 pm

    Even you are using Ubuntu Intrepid Ibex 8.10, better to downgrade from Ruby 1.8.7 to 1.8.6, as usufull for more production servers for today.
    I have written the article about smart downgrade by using repo from Ubuntu Hardy: railsgeek.com/…/ubuntu-8-10-dow

  6. Mikhailov Anatoly says

    December 15, 2008 at 1:46 pm

    Even you are using Ubuntu Intrepid Ibex 8.10, better to downgrade from Ruby 1.8.7 to 1.8.6, as usufull for more production servers for today.

    I have written the article about smart downgrade by using repo from Ubuntu Hardy: railsgeek.com/…/ubuntu-8-10-dow

  7. Robert Young says

    March 1, 2009 at 11:14 am

    When I started, I get this back. None of the ones I checked had anything to do with ruby, and look to be basic libs. I declined. Any notion of what should be done?

    The following packages will be REMOVED:

    comerr-dev{u} javascript-common{u} libjs-prototype{u} libkadm55{u} libkrb5-dev{u} libossp-uuid15{u} libpq-dev{u}

    vim-gui-common{u} vim-runtime{u} wwwconfig-common{u}

  8. Robert Young says

    March 1, 2009 at 11:14 am

    When I started, I get this back. None of the ones I checked had anything to do with ruby, and look to be basic libs. I declined. Any notion of what should be done?
    The following packages will be REMOVED:
    comerr-dev{u} javascript-common{u} libjs-prototype{u} libkadm55{u} libkrb5-dev{u} libossp-uuid15{u} libpq-dev{u}
    vim-gui-common{u} vim-runtime{u} wwwconfig-common{u}

Recent Posts

  • How to Fix Rails Flash Rendering When Using Hotwire
  • Hotwire Fix for CORS Error when using Omniauth
  • Fix Installation of Ruby using rbenv on macOS Big Sur
  • RailsConf 2021 and the Future of Conferences
  • Fixing Out of Diskspace Errors on Amazon EC2

Categories

Services I Love

HatchBox - Easy Rails Deploys Fathom Analytics
Follow @rbazinet

Rob Bazinet
@rbazinet

  • Exactly this…. https://t.co/yWj7fZ01HR
    about 1 day ago
  • https://t.co/EmagdpLoNv "Introducing GitHub Copilot X · GitHub"
    about 2 days ago
  • RIP Gordon Moore: https://t.co/c5J9LaHrj8
    about 2 days ago
  • Our daughter works as a teaching assistant at a local K-8 public school. It’s become apparent that students today r… https://t.co/p2t912GVyc
    about 2 days ago
  • Working to wrap up my current consulting gig by mid-April. I will be looking for the next thing soon. If anyone has… https://t.co/sg3cSV9yqM
    about 3 days ago
  • RSS - Posts
  • RSS - Comments
Find me on Mastodon