Well, I am abit ahead of the release date. This tutorial is done on Ubuntu Lucid 10.04 beta and I would not expect there would be major changes in final release that could disrupt any instructions listed here.
Prerequsites
Ubuntu repository contains Ruby 1.9.1 package however this package suffers few bugs that doesn’t run some Gem packages. So I would highly RECOMMEND you to compile for yourself a instance of Ruby 1.9.1 from source. To compile Ruby from source, you need to install compilers and libraries headers.
[bash]
$ sudo apt-get -y install libc6-dev libssl-dev libmysql++-dev libsqlite3-dev make build-essential libssl-dev libreadline5-dev zlib1g-dev
[/bash]
Install Ruby 1.9.1 from source
[bash]
$ cd /tmp
$ mkdir src
$ cd src
$ wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p378.tar.bz2
$ tar xjvf ruby-1.9.1-p378.tar.bz2
$ cd ruby-19.1-p378
$ ./configure –prefix=/usr/local
$ sudo make && sudo make install[/bash]
You can check if Ruby has been installed successfully by
[bash]
$ ruby -v[/bash]
and it should output
[bash]
ruby 1.9.1p378 (2010-01-10 revision 26273) [i686-linux]
[/bash]
Should you see the “Happy new Ruby” returned, then your installation is ready to go
[bash]
ruby -ropenssl -rzlib -rreadline -e “puts ‘Happy new Ruby'”
[/bash]
Ruby 1.9 bundles RubyGem so you don’t have to install it
Install SQLite3 and MySQL 5.1
[bash]
$ sudo apt-get install mysql-server-5.1 sqlite3
[/bash]
Please make sure you set a password for MySQL server.
Install Rails and essential gems
[bash]
$ sudo gem update –system
$ sudo gem install mysql rails rack rake mysql sqlite3-ruby
$ sudo gem install ruby-debug19 — –with-ruby-include=./ruby-1.9.1-p378/
[/bash]
We can check if all gems are installed successfully
[bash]
$ gem list
[/bash]
and it should list
[bash]
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
mysql (2.8.1)
rubygems-update (1.3.5)
sqlite3-ruby (1.2.5)
[/bash]
Now you can generate your own Rails app.
nice tips..!
thx, suwun,,
I would like to say, nice webpage. Im not sure if it has been addressed, however when using Firefox I can never get the entire page to load without refreshing alot of times. Could just be my modem. Appreciate your work
thx alot..