Installing Ruby on Rails 2.3 and Phusion-passenger on Ubuntu 8.10

Ruby on Rails 2.3 is finally out, promptly I went to install it on my ( Ubuntu 8.10 ) machine ( though I haven’t mastered the 2.2.2 version yet :P )
Following the instruction, I run the command:

sudo gem install rails

… just to get this error ( wtf?? )…

ERROR:  Error installing rails:
	invalid gem format for /usr/lib/ruby/gems/1.8/cache/activesupport-2.3.2.gem

First I thought the gem itself need to be updated, so I run:

sudo gem update --system

but it replies with

Nothing to update

so obviously the gem is not the problem, but was something else…
A quick googling prompt me to delete the gem cache file, so I did…

sudo rm /usr/lib/ruby/gems/1.8/cache/activesupport-2.3.2.gem

and then I run the installation again ( crossing my fingers ), but it replies with the same error only this time it was the activerecord gem, so I guess the first error was solved and maybe the same solution can tackle this error too. So I run the same command again, this time I delete the activerecord gem cache file and then goes with the rails installation again.

And it worked!, rails 2.3.2 is installed on my machine, yay !!!, and since I’m using Phusion-passenger, the announcement also prompt me to upgrade passenger to 2.1.2, so I run this commands…

sudo gem update passenger

and then

sudo passenger-install-apache2-module

After that I have to replace the old passenger entries in apache configuration file ( /etc/apache2/apache2.conf ) with the new one

Place these lines at the bottom of /etc/apache2/apache2.conf, replacing the old one

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/ext/apache2/
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2
PassengerRuby /usr/bin/ruby1.8

and then run

sudo apache2ctl graceful

to restart the apache web server

and all is well…
Now it’s time to try it out…


One thought on “Installing Ruby on Rails 2.3 and Phusion-passenger on Ubuntu 8.10

  1. I’ll try soon, sebelumnya gw pusing banget ma error ini. Apalagi pas sudo gem update –system trus keluar nothing to update. Makasih om…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s