One newer database system got installed with Debian Wheezy, which makes ruby 1.9 the default, and dammit, it makes it rather difficult to convince it that I want to run ruby 1.8, which my application has been written in.
So I’m going to upgrade the application to ruby 1.9, it’s about time to do so. But given all the co-existence code between 1.8 and 1.9, how to do this has been a bit vexing.
So, first, I made sure to install ruby 1.9:
this gives me /usr/bin/gem1.9.1 as well..
But I’m going to make this the default explicitely:
I did not see a 1.9 package in Ubuntu oneiric for rails, but running the debian/ubuntu rails package is a bad idea anyway:
Now install some baseline things that you will need:
When I ran bundle install, and I got bit by:
Other people wrote about this at: http://help.rubygems.org/discussions/problems/501-broken-utf-8-handling-in-newest-rubygems-when-environment-locales-are-not-set
The solution is to make sure that your locales are set:
Now, you’ll have a bundle running with a ruby 1.9 interexampleter, and it will install gems for 1.9 rather than 1.8!
This worked great on my desktop (oneiric), but failed on a minimal devel DB server running debian squeeze (with backports):
I puzzled about this for awhile, and finally, I found that in fact I didn’t have the en_CA locale loaded. I edited /etc/locale.gen, and then ran /usr/sbin/locale-gen , and all was well.
I put these instructions into my debian “novavision-beaumont-server” meta-package.
just to be sure you have the latest stuff.