Tutorial Ruby in PDF

This is a list of Ruby tutorials in PDF for free download

Short Description:
Learn the basics of Ruby on rails programming language, free training document in 250 pages for all level users.
Submitted On:
2017-06-17
File Size:
1,728.43 Kb
Downloads:
445
Short Description:
This is a PDF tutorial about Ruby on Rails under 39 pages by Bhaskar Vaish, you will learn how to build web application using a Rails framework application.
Submitted On:
2017-06-17
File Size:
1,125.03 Kb
Downloads:
193
Short Description:
A complet tutorial about Ruby programming language under 594 pages for advanced level students, free training document in PDF by David Flanagan and Yukihiro Matsumoto.
Submitted On:
2017-04-01
File Size:
4,213.89 Kb
Downloads:
362
Short Description:
Download free Ruby tutorial course in PDF, training file in 69 chapters and 235 pages. Free unaffiliated ebook created from Stack OverFlow contributor.
Submitted On:
2019-04-30
File Size:
1.87 MB
Downloads:
88
Short Description:
Download free Ruby On Rails tutorial course in PDF, training file in 73 chapters and 231 pages. Free unaffiliated ebook created from Stack OverFlow contributor.
Submitted On:
2019-04-30
File Size:
2.06 MB
Downloads:
69

These courses teaches you the basics of Ruby on Rails, to get started smoothly. Ruby on Rails is a web framework based on the MVC design pattern and using the interpreted and object oriented Ruby programming language.

Ruby is a fully object-oriented, cross-platform interpreted language. In addition to being very intuitive, Ruby can be used as a scripting language in the same way as PERL or others, but its recent rise is mainly due to the appearance of Ruby on Rails, an extremely powerful web framework based on Ruby . These courses will teach you the basics of this language, its strengths, etc.

Installation and basic concepts

Let's see how to install Ruby on Windows.
Nothing too complicated, just go to Ruby's page, then click on "Downloads", and download the One-Click Installer for Windows. All you have to do is choose your installation directory and validate until the installation procedure is complete.

Ruby comes with two editors by default: SciTe and FreeRIDE.

To launch FreeRIDE (written entirely in Ruby), go to the Ruby installation directory, then to the "freeride" directory, and run "run.bat".

I prefer SciTe, but that only depends on personal considerations. To launch it, go to the Ruby installation directory, then to the "scite" directory, and run "SciTE.exe".

In Ruby, everything is object. Absolutely everything. An integer, a string, and even classes, as surprising as it may seem.

First steps

We will learn by experience. For that, we will use irb (Interactive Ruby).

Using irb, we will be able to test Ruby's basic syntax and directly view the result, without having to create a file containing our code (a .rb) and modify it each time. You just have to launch a DOS window (start -> run -> cmd), then type "irb" in the command prompt, and validate.

Manipulation of simple variables

The command prompt has changed. You can now directly type your orders. Try typing the following lines:

  • a = 2
  • b = 3
  • puts "a + b is worth" + (a + b) .to_s

Here's what you should get on the screen:

irb (main): 001: 0> a = 2

=> 2
irb (main): 002: 0> b = 3
=> 3
irb (main): 003: 0> puts "a + b is worth" + (a + b) .to_s
a + b is 5
=> nil

Many things in this simple example. We have just created two variables, a and b, and assigned them values. Then we decided to display their sum using the puts method. So we display a string (the part in quotation marks), which we concatenate to another string using the + operator.

This second string is actually the result of the sum of our two variables (again this time using the + operator, which does not have the same function depending on the type with which it is used), which we let's convert to a string using the to_s method (to make concatenation possible, we need two identical types).

You will notice that nowhere have we defined the type of a or b. Ruby manages like a big one: it's the duck typing (it looks like a duck, it behaves like a duck, so it's a duck).

 

6K 2K