Since I started dabbling into Ruby on Rails (known also as RoR) I was amazed of the installation complexity surrounding it. That if you want to install it on Linux, because on Windows it seems there is one solution which does it with several clicks: www.railsinstaller.org

Somebody needs to make this installation steps on Linux much simpler and user-friendly.

I spent several days and followed several tutorials to make it work on Ubuntu 11.04 but I always encountered errors.

That prompted me to write my own step-by-step detailed tutorial and I tried to incorporate in it any common errors I’ve got and how to solve them.

This tutorial is made for absolute beginners in Ruby on Rails but also beginners in Linux.

The result is a 35 page PDF tutorial on installing Ruby on Rails 3.1 on Ubuntu (version 11.04 and 11.10) and Linux Mint (version 11, 12).

I released this tutorial under Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

(right-click and Save Link as… or Save Target As… – or just left-click on the link to see it online)

The Ruby on Rails installation tutorial has two sections:

Ruby on Rails 3.1 installation using Ruby 1.9.2 , Rails 3.1 , WEbrick web server and SQLite3 database (this is the default installation – WEBrick and SQLite is used only in development, not production)

, , web server and database (this is the default installation – WEBrick and SQLite is used only in development, not production) Ruby on Rails 3.1 installation using Ruby 1.9.2, Rails 3.1, Apache web server and MySQL database (this is more advanced – Apache and MySQL is used also in production)

In the future I will add the installation using also nginx web server www.nginx.com.

As for Ubuntu, instead of installing it from scratch I used a pre-made VMware virtual machine saving thus time. If you want to install Ubuntu or Linux Mint from scratch (on your computer or on a virtual machine) you will have to look for a tutorial for that.

To use a VMware virtual machine you need to install the VMware player (free): http://www.vmware.com/products/player

Then download a pre-made virtual operating system appliance from VMware website (free also): http://www.vmware.com/appliances/directory/cat/508 (look for a Ubuntu 11.10, 11.04 machine, or Linux Mint 11 operating systems appliances)

If you get a Ubuntu 11.04 virtual machine you can upgrade Ubuntu to the latest version (11.10 in this case) by going to Update Manager and you will see a note there prompting you to upgrade to that latest version. It’s up to you if you want to upgrade.

Linux Mint www.linuxmint.com is a fork of Ubuntu so it uses many packages which Ubuntu uses.

After having setup the Ruby on Rails environment you can start building the application from this online book which I found very useful and quite explanatory: Ruby on Rails tutorial by Michael Hartl (it is a bit outdated but still useful)

I will keep updating this tutorial I made as the new Ruby on Rails version are coming out (as well as new version of Ubuntu/Linux Mint).

The name of the PDF file will remain the same, only the content will change.

If you have found this tutorial useful please tell to others too (on Ruby on Rails/wen development groups and forums) and, if possible, link to this page so more people can benefit.

If you have suggestions or improvements for this tutorial please let me know in the comments. Thank you.

(right-click and Save Link as… or Save Target As… – or just left-click on the link to see it online)

Useful links:

www.rubyonrails.org (the official Ruby on Rails website)

www.railsinstaller.org (Windows Ruby on Rails installer)

www.ruby-lang.org (the official Ruby programming language site)

http://httpd.apache.org (the official Apache web server site)

www.mysql.com (the official MySQL database site)

www.vmware.com (the official site of the company which builds virtual machine software VMware)

www.ubuntu.com (the official Ubuntu Linux site)

www.linuxmint.com (the official Linux Mint site)

http://ruby.railstutorial.org/ruby-on-rails-tutorial-book (the site of Michael Hartl’s Ruby on Rails Tutorial – for Rails 3.1)

http://ruby.railstutorial.org/ruby-on-rails-tutorial-book?version=3.2 (the site of Michael Hartl’s Ruby on Rails Tutorial – updated for Rails 3.2)

www.railscasts.com (video tutorials by Ryan Bates – some are free)

www.stackoverflow.com (very useful site for developers of all kind)

http://groups.google.com/group/rubyonrails-talk (Google group for Ruby on Rails developers)

Berkeley Ruby on Rails class (five parts, on Youtube)

Youtube.com (lots of video tutorials on Youtube)

This tutorial is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License