Beyond The Freedom

Icon

Just another WordPress.com weblog

Installing Ruby on Rails (Ubuntu 8.04 Hardy Heron)

This is what I did to get Ruby and Rails working on my new Ubuntu 8.04 LTS. It appears that nothing really changed from previous version. The basic step is to install the Ruby using apt-get and installing the Gem from the source. I learned my lesson NOT to install Ruby from the source on Ubuntu. Just remember that if any gem installation fails, just get the required library using apt-get and get the ‘dev’ version as well. This is the rule of thumb I’ve been following and has worked out well for me.

Step 1: Install Ruby from apt-get.

~$ sudo apt-get install ruby irb ri rdoc ruby1.8-dev libzlib-ruby libyaml-ruby libreadline-ruby libncurses-ruby libcurses-ruby libruby libruby-extras libfcgi-ruby1.8 build-essential libopenssl-ruby libdbm-ruby libdbi-ruby libdbd-sqlite3-ruby sqlite3 libsqlite3-dev libsqlite3-ruby libxml-ruby libxml2-dev

Step 2: Download and install RubyGems.

  • Just download and extract the latest Gem and run following command.

~$ sudo ruby setup.rb

  • After successful installation, run this to create the link in /usr/bin

~$ sudo ln -s /usr/bin/gem1.8 /usr/bin/gem

Step 3: Install Rails and Gems.

~$ sudo gem install rails

~$ sudo gem install sqlite3-ruby mongrel capistrano

Since I don’t use MySQL anymore, it’s really optional. It’s basically same as before, just make sure you are using following command to get everything you need for MySQL.

~$ sudo apt-get install mysql-server mysql-client libdbd-mysql-ruby libmysqlclient15-dev

** UPDATE **

  • “libmysqlclient-dev” is now “libmysqlclient15-dev” => I found this out while installing my new server, but it appears that maurizio de magnis already posted the solution in the comments. Thanks!
  • “buildessential” is no longer required when installing Ubuntu Server.

Filed under: Ruby Programming, Ruby on Rails , , ,

Hello world!

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!

Filed under: Uncategorized

Pages

Archives