6

Upgrading to 14.04 removed my ruby 1.8.7. I need it back. :) Badly. Some old projects still rely on it.

Gems seems to be left untouched.

How do I install ruby 1.8 back while still keeping Ubuntu 14.04 on my computer? Any PPA's to add? I tried compiling from source but got a bunch of errors.

Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
user272449
  • 63
  • 1
  • 1
  • 3
  • It does support 14.04 and 15.04 Date 25th of October 2015 I needed it for Wine-Doors (old Wine-app, does only use ruby1.8) –  Oct 25 '15 at 05:13

2 Answers2

6

I did this by adding the saucy (13.10) repositories back to my sources.list file.

  1. sudo -H gedit /etc/apt/sources.list
  2. Add deb http://gb.archive.ubuntu.com/ubuntu/ saucy main restricted after the first set.
  3. Save the file and exit the editor.
  4. sudo apt-get update
  5. sudo apt-get install ruby1.8
  6. sudo apt-get install rubygems

Probably isn't the best way, but it seemed to work for me. I had an older project with compass/sass that was failing on ruby 1.9 but now works as before.

I noticed that installing ruby 1.8 also installed a package called ruby-switch. Might be able to switch between 1.8 and 1.9 with this utility, although I haven't played with it and RVM is probably a better solution for switching ruby versions.

Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
  • Yes, this is what I finally came to.. more or less. Using different steps and tools but the basic idea is the same - using "saucy" repositories again. – user272449 May 13 '14 at 13:20
  • Since 13.10 is end-of-life now, I'm wondering if it may soon be necessary to [use the corresponding old-releases software source](http://askubuntu.com/q/91815/22949) for that `deb` line. As a totally separate matter, note that some software from saucy (or any Ubuntu version) got [SRUs](https://wiki.ubuntu.com/StableReleaseUpdates) after 13.10's release; in that case one would use `saucy-updates` or `saucy-security` instead of `saucy`. As shown on [this cached page](https://web.archive.org/web/20130724063921/https://launchpad.net/ubuntu/+source/ruby1.8), `ruby1.8` did not so `saucy` is correct. – Eliah Kagan Aug 04 '14 at 11:56
6

You should not use repos that are for older versions. You will run into severe maintenance problems and possibly break your system.

Use a PPA like this one:

sudo apt-get install python-software-properties
sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update

EDIT: As pointed out in the comments, they don't support 14.04 just yet, but they have an experimental repository that has packages for Trusty.

kraxor
  • 5,459
  • 3
  • 26
  • 35