Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Thursday, March 8, 2007

HOWTO: Ubuntu Edgy Eft (6.10) + Ruby 1.8.5 + Gem 0.9.2 + Rails 1.2.2

There have been several excellent articles / blogs / etc explaining how to get the latest version (as of 2007-03-08) of ruby + gem + rails running on Ubuntu 6.10 Edge Eft, but no one resource met my needs to get me completely up and running.

So here's the various excellent resources I used to finally get ruby + gem + rails working on my ubuntu system:

Install ruby:
http://www.rubywizards.com/viewtopic.php?pid=19

Grab the gem source
http://rubyforge.org/frs/?group_id=126&release_id=9501

To Install gem:
tar -zxvf rubygems-0.9.2.tgz
cd rubygems-0.9.2
ruby setup.rb

If you get the zlib error, you probably need to get additional libs:
apt-get install zlibc zlib1g zlib1g-dev
(see http://www.nabble.com/Gems-zlib-problem-t992896.html for more info)

Re-compile and re-install ruby now that the new libs are there
http://www.rubywizards.com/viewtopic.php?pid=19

Make sure you're running the latest version:
ruby -v
ruby 1.8.5 (2006-08-25) [i686-linux]

if you still get the zlib error, copy the zlib over (this should be one line):
sudo cp /usr/lib/ruby/1.8/i486-linux
/zlib.so /usr/local/lib/ruby/site_ruby/1.8/i686-linux/

Great info about the zlib error in Ubuntu:
http://www.penlug.org/twiki/bin/view/Main/LinuxBookReviewsAgileWebDevelopmentwithRails

Then re-install gem:
ruby setup.rb

make sure gem works:
gem -v
0.9.2

Then grab rails:
gem install rails --include-dependencies --remote

make sure you're good to go:
rails -v
Rails 1.2.2


I hope this helps someone!