Tuesday, January 3, 2012

Install and Setup Ruby, Rails 3 on Ubuntu 11.04

To install Rails 3, system needs supporting packages(including ruby,rake,libtool,etc).

1. Install those support packages 

sudo apt-get install ri ruby ruby1.8 ruby-dev rake libruby1.8 zlib1g-dev libssl-dev libreadline5-dev libncurses5-dev build-essential curl git-core git-gui gitk libxml2 libxml2-dev libxslt1-dev bison autoconf libtool

2. Installing rails by RVM(Ruby Version Manager)
For more information about installing RVM, Check it here

sudo rvm install 1.9.2

To make version 1.9.2 as default ruby version(if you have multiple version ruby)

sudo rvm use 1.9.2 --default

3. Install rails gem

sudo gem install rails

4. Install sqlite3

To install this you may need "libsqlite3-dev". so get this from Ubuntu package repo 

sudo apt-get install libsqlite3-dev

Now rails 3 is ready for developing application, In general rails come up with in-build WEBrick webserver. So you can create and deploy sample application on WEBrick.

No comments:

Post a Comment