Great discoveries and improvements invariably involve the co-operation of many minds. I may be given credit for having blazed the trail but when I look at the subsequent developments I feel the credit is due to others rather than to myself.
Alexander Graham Bell

You have heard the story, havent you, about the man who was tarred and feathered and carried out of town on a rail? A man in the crowd asked him how he liked it. His reply was that if it was not for the honor of the thing, he would much rather walk.
Abraham Lincoln

A gem cannot be polished without friction, nor a man perfected without trials.
Chinese Proverb

Among Life’s precious jewels, Genuine and rare, The one that we call friendship Has worth beyond compare.
Source Unknown

I learned a lot of useful information at Ruby on Rails Tutorial.

Open up a terminal window –  Type the following commands.

mkdir ruby
cd ruby
tar -zxvf ruby-1.9.2-p180.tar.gz

cd ruby-1.9.2-p180
sudo make install

This takes a a few minutes.  At the end, your password will be required.

ruby -v
which ruby

gem update --system

If your get the following error:

run the following.

sudo apt-get install zlib1g-dev
cd ruby/ruby-1.9.2-p180/ext/zlib
ruby extconf.rb
sudo make install

Rerun the gem update –system command.  This leads to a permission error so run sudo gem update –system

sudo gem sources -a
sudo gem install rails

rails -v
which rails

Run sudo gem update

To use mysql with ruby on rails, do the following:

sudo apt-get install libmysqlclient16 libmysqlclient16-dev
sudo gem install mysql2

To use postgres-sql with ruby on rails, do the following:  Note-“q” for libpq-dev and “g” for install pg

sudo apt-get install libpq-dev
sudo gem install pg

Before testing ruby and rails installation, the sqlite3 database libraries need to be installed.

sudo apt-get install sqlite3 libsqlite3-dev
sudo gem install sqlite3

mkdir RailsApps
cd RailsApps
rails new HelloWorld

cd HelloWorld
bundle install

Start the rails server and then enter localhost:3000 in your web browser.  This will show rails is functioning.

Leave a Reply