Getting Started with Ruby On Rails

Earlier this month, I have prepared an introduction to Ruby on Rails for beginners. Here is what I have advised them.

Feel free to comment, add information or ask for more!

Ruby on Rails is a popular framework to develop web applications quickly with tremendous easiness.
But where to get started?

First, some introduction to what is Ruby On Rails and what it can achieve.

A little bit of Ruby practice could be useful.
Ruby is pretty easy and well done, so it comes quickly naturally.

Getting to know Ruby on Rails:
– Really well done website:
Practice and learn for a while online before/while installing
– Read some guides:

Then, installing Ruby on Rails on a local machine
There are many solution in order to achieve this.
An obvious one:

My favorite solution is with RVM which will allow to manage easily multiple versions of Ruby through time.
– install RVM
– install Ruby with RVM
– install Rails as a gem

My script on Unix:


# Install Ruby Version Manager
\curl -L | bash -s stable

source ~/.bashrc

# Ruby

rvm install 1.9.3
rvm alias create default ruby-1.9.3-p484

rvm rubygems current
source ~/.rvm/scripts/rvm

# Rails
gem install rails

Note : the following will be probably needed:
– a database (SQLite, Postgresql, MySQL, Mongo…)
– a versioning system, like git

A server for development won’t be needed at first, as it comes with Rails. Later, a production server will be needed to be set up, but this is another story.

Now, it is time to apply what have been learnt and create a first Rails application. An ultra quick step by step tutorial:

# Create an application
rails my_game
cd my_game

# Create a first resource
rails generate scaffold HighScore game:string score:integer

# run the development server
rails s

Popular gems:
Gems are libraries for Ruby developed by worldwide contributors. They are easy to install. Some gems are already included when a new Rails application is created, such as SASS and Coffeescript.

These are my favorite gems to complete the starting package, if needed:

# Gemfile
# Write views in HAML
gem 'haml'
gem 'haml-rails'

# Better errors and console to debug in web
group :development do
gem "better_errors"
gem "binding_of_caller"

# pagination
gem 'will_paginate', '~> 3.0'
gem 'will_paginate-bootstrap'

# authentification
gem 'devise'

# authorizations
gem 'cancan'

# social login
gem 'omniauth'

# File upload
gem 'carrierwave'

And this should be it for a beginner to start enjoying Ruby On Rails

As a conclusion, extremely useful resources: : Ryan Bates teaches everything essential to get started with Rails, with screencasts and nice narration. : Ruby and Rails API.

Latest posts by Fab (see all)

About Fab

Solutions Architect, I build great workflows for the news, media and broadcast industries. I play with data too.

Leave a comment

Your email address will not be published. Required fields are marked *