Thursday, June 18, 2009

How to install rubby 1.9 and Rails 2.3.2 for ubuntu 8.10

I explain step by step how to install Ruby 1.9 and rails 2.3.2
1.first open your command prompt.
2 .Then install foolowing package in your computer

sudo apt-get -y install libc6-dev libssl-dev libmysql++-dev libsqlite3-dev make build-essential libssl-dev libreadline5-dev zlib1g-dev
Install RUby 1.9
Enter following comand step by step

cd ~
mkdir src
cd src/
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.gz
tar xzvf ruby-1.9.1-p0.tar.gz
cd ruby-1.9.1-p0/
wget http://redmine.ruby-lang.org/attachments/download/237
patch -p1 < 237
./configure --prefix=/usr/local --with-openssl-dir=/usr --with-readline-dir=/usr --with-zlib-dir=/usr
sudo make && sudo make install

3.Then check your ruby version following command
ruby -v


4. The output something may be
ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux]

After enter the following code output should be "Happpy New Ruby "

ruby -ropenssl -rzlib -rreadline -e "puts 'Happy new Ruby'"

Ruby 1.9 bundles rubygems so there is no need to install it.

5. Then install mysql-ruby adapter

cd ~/src
wget http://rubyforge.org/frs/download.php/51087/mysql-ruby-2.8.1.tar.gz
tar xzvf mysql-ruby-2.8.1.tar.gz
cd mysql-ruby-2.8.1
sudo ruby extconf.rb
make
sudo make install
6. Then install rails2.3.2 and other stuff for you computer
sudo gem install rails rake rack sqlite3-ruby

7. Then check your machine all packages are installed. so you can use following command

gem list

8.The output something like this

actionmailer (2.3.2)
actionpack (2.3.2)
activerecord (2.3.2)
activeresource (2.3.2)
activesupport (2.3.2)
rack (0.9.1)
rails (2.3.2)
rake (0.8.4)
sqlite3-ruby (1.2.4)

Now you can use rails and ruby for develop your programme
And I next explain what is rails and ruby.




No comments:

Post a Comment