Become web developer using Ruby on Rails

If you are a newbie to programming and want to become web developer means the best place is to start with Ruby on Rails shortly called as (ROR), Ruby is easy to learn language and ROR is fully configured frame work so you can directly work with your first database backed website with in a days.

In this article, I will give you idea about where you to start and end. There are four steps involved in web development they are.

  • Getting knowledge in basic things like HTML,CSS,JS
  • Familiar with databases and database queries
  • Basics of ruby
  • Learning ROR
  • Going deep with ROR


  1. Basics

In my opinion he best place to familiar with HTML,CSS and JS is w3schools or tutorials point. Both have interactive tutorials so you can run your code directly on the browser, and they don’t charge for any tutorial.


CSS –  

JavaScript –

2. Databases

Once you complete this you will familiar with how static websites are working, now it is the time to move with dynamic websites for this we have to study about databases. At first study about databases little bit and work with SQL databases (Later you may move to any database you wish).

For this also go with tutorials point, in Rails we don’t directly write database queries it is enough to understand basics of SQL and queries (for now).


3. Ruby

There are lot of ruby tutorials available in web, I will give you some quick way to learn ruby. Which will take minimal time and you can most of ruby syntax.

  1.  Ruby in 20 minutes
  2. Study Little book of ruby (Even though this book is older it is enough for understanding basic syntax of ruby)
  3. If you time and wish to learn ruby more try with this free tutorial (Other ruby course in codeschool will ask you money)

This will give you basic ideas about ruby language.


4. Ruby on Rails

For beginner I will suggest only two websites to learn ruby on rails


This tutorial not only covers ruby on rails. It will cover many tools like git, testing, hosting application on heroku. For the first time, you feel difficulties. But finish this tutorials so that you will familiar not only with ROR and also with code versioning, testing, deployment.


This is open source project, Covers most of the things including html,CSS, JS, Ruby, ROR.

5. Deep with ROR

Now you know how to create ROR application and work with that app.  Now it is the time to learn more things on ROR. I will give you some of the places where it is useful to spend time.

  1. Ruby Guides




Easy Ruby on Rails install

Whenever I setup new Linux for developing rails application. I feel bit tired of installing all necessary things for rails development.

For that I have written one shell script, that install most of the things requires for rails development. If you want this lazy thing. You can check here

And use it , fork the code and update if you feel some thing to be added.


A simple instruction to Rspec – 3 in Ruby on Rails -4

This is small introduction about rspec version 3 for ruby on rails developers, and also note that this is not mean for techy geeks 🙂

Initial Setup
add gem 'rspec-rails', '~> 3.0.0'

then bundle install

And run rails generator rspec:install

Herein after spec files are automatically created when ever you create model, controller, view files, if you dont want any spec file to be created automatically then
in your application.rb

config.generators do |g|
g.test_framework :rspec,
view_specs: false,
helper_specs: false,
routing_specs: false,
controller_specs: true,
request_specs: false

put false wherever you dont want to create spec files
RSpec generators can also be run independently. For instance,

rails generate rspec:model post

All specs are created inside spec folder and to run test just type rspec in terminal

If you want to test only a particular file say products.rb in model then

 rspec ../rails_app/spec/models/products.rb

Thats all

Model specs

require "rails_helper"

describe Post do
it “checks it saves the data” do
expect(Post.count).to eq 0
expect(Post.count).to eq 1

controller spec

require 'rails_helper'

RSpec.describe WelcomeController, :type => :controller do
it ‘has 300 status code’ do
get :index
expect(response.status).to eq(200)


rspec-rails offers a number of custom matchers, most of which are
rspec-compatible wrappers for Rails’ assertions.

expect(response).to redirect_to(path)
expect(response).to render_template(template_name)
assigned objects
expect(assigns(:widget)).to be_a_new(Widget)