Since yesterday there is a new version of Ruby On Rails available: 0.13.1. It seems like this version has introduced a version-check on Ruby which makes it hard to get Rails installed on Ubuntu 5.04. The problem here is, that Hoary uses a pre-release of Ruby 1.8.2 as base which was made 2 days before the final release.
I decided to simply rebuild Breezyâs ruby1.8 (1.8.2-9) for Hoary.
Add Breezyâs repositories to /etc/apt/sources.list
Pin Breezy to priority 1, to apt wonât upgrade the whole system â put this in /etc/apt/preferences:
Package: * Pin: release breezy Pin-Priority: 1
Install the build-essential package.
Go to http://packages.ubuntu.com/breezy/source/ruby1.8 and install Hoaryâs versions of all of the packages marked as build-depends (I vaguely remember that when I wanted to go the automagic route of âsudo apt-get build-dep ruby1.8â apt wanted to pull Breezyâs version of the build-depends).
Make a directory and do an âapt-get source ruby1.8â (without a sudo) inside it.
âcd ruby1.8-1.8.2â.
âfakeroot dpkg-buildpackageâ.
â¦waitâ¦
You should have some fresh *.deb packages in the parent directory of ruby1.8-1.8.2. Go there and do a âsudo dpkg -i libruby1.8_1.8.2-9_i386.deb ruby1.8_1.8.2-9_i386.debâ.
Note: This is a minimalistic approach that gives you ruby1.8. If you use other Ruby packages/tools (IRB, RI, etc.) you might backport them as well (some of them are built from the ruby1.8 source package and wait for you already).
Shot on July 16, 2005 at 07:13 +0200
Thank you very much for this solution :-)
zerok on July 16, 2005 at 08:09 +0200
To follow-up: rails 0.12.1-1 in Ubuntu do not differ one bit from rails 0.12.1-1 in Debian testing, so I decided to simply grab rails 0.13.1-1âs .deb from Debian unstable and dpkg -i it.
âdpkg-deb -f rails_0.13.1-1_all.debâ shows the package dependencies; I satisfied some from the plethora of packages that came out of backporting rails1.8, some from Breezy (libredcloth-ruby1.8, the dummy rdoc and ruby) and some simply from Hoary (rake, libdbi-ruby1.8 / libpgsql-ruby1.8).
Note: libmysql-ruby1.8âs changelog shows that Breezyâs 2.4.5-6.1 contains some RC bugfix, but is recompiled against newer dependencies. If Hoaryâ
Shot on July 16, 2005 at 16:40 +0200
[sorry, Firefox crashed on me]
If Hoaryâs libmysql-ruby1.8 2.4.5-6 doesnât work, one might need to recompile Breezyâs libmysql-ruby1.8 2.4.5-6.1 (the way I recompiled ruby1.8 in the beginning).
Shot on July 16, 2005 at 16:42 +0200
Thanks for the info :) But at least for me the mysql-ruby version that is bundled with hoary works without a problem :)
zerok on July 16, 2005 at 18:39 +0200
Great to hear it. :)
As an aside â I guess Iâm going to use RubyGems sooner or later anyway. As I guess itâs not too good to mix and match gems and APT packages, Iâll stay with only Ruby from packages, uninstall the rails package, get the RubyGems sources, checkinstall -D them and get everything else through gems.
From what I read so far, checkinstall -D does the same thing as make install, but tracks the changes to the system and actually turns the source-based RubyGems installation into a .deb package (an âunkosherâ one, but itâs still better than âclassicâ make install).
Any thoughts on this route? :)
Shot on July 20, 2005 at 01:40 +0200
My approach on this is a little bit different. Manually installed stuff gets into /usr/local or /opt here. I'm also currently playing a little bit with sourceinstall:
http://www.gnu.org/software/sourceinstall/
zerok on July 20, 2005 at 02:08 +0200
To tell the truth, I didnât test it (yet), but my bet would be on checkinstalling RubyGems into /opt.
Iâll look at sourceinstall, thanks for the link! So far they definitely get extra points for using wesnoth as the screenshot example. ;)
Shot on July 20, 2005 at 03:59 +0200
Hi zeroK,
I was wondering wether you are also using rubygem? Because installing ruby with a prefix didn't work for me as soon as I had to sudo ruby stuff or sudo gem install stuff. Because sudo is compiled --with-secure-path on Ubuntu, there is no way to add the path for sudo. I tried adding links in /usr/local/bin, but it seems that messed up other stuff because of the many other ruby packages I had installed with apt (that were living in a different path), so I got other error messages. I finally installed ruby without a prefix, but with checkinstall - less trouble. ;)
Sencer on Aug. 6, 2005 at 23:39 +0200
I'm actually no longer using Ubuntu but when I compiled ruby with the alternative prefix I can't recall any such problem as you've described :S Perhaps I was just lucky or I've messed it up that hard to not make it look like it was working :)
zerok on Aug. 7, 2005 at 01:06 +0200
I have been experimenting with Ruby and came across this problem now when I wanted to get started with Rails. For reference, in case someone else has the same problem, there is an updated Ruby in hoary-backports:
deb http://archive.ubuntu.com/ubuntu hoary-backports main universe
Knut on Sept. 26, 2005 at 02:31 +0200