Install Ruby in Ubuntu 8.10
Install the following packages for ruby
sudo aptitude install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8 libopenssl-ruby sqlite3 libsqlite3-ruby1.8
Note:- Rails version 2.0+ uses sqlite3 as its default database.
Create Symbolic links
We need to create some symlinks from the install to locations every programme would look for
sudo ln -s /usr/bin/ruby1.8 /usr/bin/ruby
sudo ln -s /usr/bin/ri1.8 /usr/bin/ri
sudo ln -s /usr/bin/rdoc1.8 /usr/bin/rdoc
sudo ln -s /usr/bin/irb1.8 /usr/bin/irb
Check Ruby Version
If you want to check ruby version use the following command
RubyGems is a package manager for the Ruby programming language that provides a standard format for distributing Ruby programs and libraries , a tool designed to easily manage the installation of gems, and a server for distributing them.
Easy Installation and removal of RubyGems packages and their dependents.
Management and control of local packages
Package dependency management
Query, search and list local and remote packages
Multiple version support for installed packages
Web-based interface to view the documentation for your installed gems
Easy to use interface for building gem packages
Simple server for distributing your own gem packages
Now you can download latest rubygems from here
Unpack rubygems-1.3.1.tgz file using the following command
tar xzvf rubygems-1.3.1.tgz
Install rubygem using the following command
sudo ruby setup.rb
This will complete the rubygem installation.
Now create a symbolic link using the following command
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
Check gem version using the following command
Update gem packages using the following command
sudo gem update
Now we need to continue rails installation with the following command
sudo gem install rails
you can check what gems were installed with
sudo gem list
Testing sqlite3 database
Now we can do a simple test to see if the sqlite3 module is working
irb(main):001:0> require ‘sqlite3'
If the result does not return ‘true' the you may have missed a step.
Postfix and subversion
Finally, we need to install postfix and subversion so we can ‘check-out' plugins and send mail from our Rails applications
sudo aptitude install postfix subversion -y
Answer the postfix questions as you see fit but the defaults usually suffice for our purposes as we are only using it to send emails and not for receiving mail.
OK now have a Ruby on Rails and postfix/subversion stack setup and ready to roll.Now you are ready to install the server of your choice whether that be Litespeed, Nginx or Apache.