Updating your repository.
$ sudo apt-get update
Installing ruby, mysql, sqlite and build-essential
$ sudo apt-get install ruby ri rdoc build-essential
$ sudo apt-get install mysql-server mysql-client libmysql-ruby
$ sudo apt-get install libsqlite3-0 libsqlite3-dev libsqlite-ruby
Installing gem package
$ sudo apt-get install gem
Installing ruby on rails
$ sudo gem install rails --include-dependencies
Installing a few useful ruby gems:
$ sudo gem install mongrel
$ sudo gem install capistrano
$ sudo gem install ruby-debug
$ sudo gem install image_science
$ sudo gem install rmagick
$ sudo gem install RedCloth
Now you may create your first rails app:
$ rails myapp
If you want to use mysql instead of sqlite in your app:
$ rails myapp -d mysql
Resources: