Ruby on Rails Tutorials- Basic of Ruby on Rails

Ruby on Rails Tutorials- basic of Ruby on Rails

What is Ruby on RailsWhat is Ruby on Rails:

Rails is a web application development model view controller (MVC) framework written in the Ruby language. It is designed to make programming web applications. Its also uses HTML, CSS and JavaScript for display and user interfacing. It uses Metaprogramming techniques to write programs.

Ruby was designed and developed in the mid-1990s by Yukihiro “Matz” Matsumoto in Japan and conceived on February 24, 1993. It provides a program called “ERB” (Embedded Ruby), ERB allows you to put Ruby codes inside an HTML file. It is object oriented programming language, every value is an object, including classes and instances. It is used in rails framework and best languages for Metaprogramming. If you want some Ruby code executed, enclose it between <% and %>.

Basically Ruby has lots of version released in last years:

Version history (Descending Order)
Version Initial release date
2.4 Dec 25, 2016
2.3 Dec 25, 2015
2.2 Dec 25, 2014
2.1 Dec 25, 2013
2.0 Feb 24, 2013
1.9 Dec 25, 2007
1.8 Aug 04, 2003

David Heinemeier Hansson extracted Ruby on Rails, Hansson first released Rails as open source in July 2004, but did not share commit rights to the project until February 2005.  In August 2006, the framework reached a milestone when Apple announced that it would ship Ruby on Rails with Mac OS X v10.5 “Leopard“,which was released in October 2007.

Basically Rails has lots of version released in last years:

Version history (Descending Order)
Version Date
5.1 May 10, 2017
5.0.1 December 21, 2016
5.0 June 30, 2016
4.2.5 November 13, 2015
4.2 December 19, 2014
4.1 April 8, 2014
4.0 June 25, 2013
3.2 January 20, 2012
3.1 August 31, 2011
3.0 August 29, 2010
2.3 March 16, 2009
2.2 November 21, 2008
2.1 June 1, 2008
2.0 December 7, 2007
1.2 January 19, 2007
1.0 December 13, 2005

The file extension of ruby is “.rb“, such as ‘hello-word.rb‘. In Microsoft Windows, Ruby source files sometimes end with “.rbw“, as in ‘hello-word.rbw‘.

Which database is recommended to use with Ruby on Rails?

  • PostgreSQL
  • SQLite
  • MySQL

It is your choice that what you should try in RoR projects.

How to type “Hello World!” in Ruby on Rails:

Type the following in your editor:

and then click File/Save As… Give the name hello-world.rb and store it in your ruby programs folder. To run your program, open a command window(cmd) and type ruby hello-world.rb as shown below:

You should see the output as shown above.

I love coding in Ruby (especially when it’s on Rails) and you will love this too, just give it some time.

 

1 reply

Trackbacks & Pingbacks

  1. […] Rails installation is a very simple and easy, focus all the steps carefully. In our previous post What is Ruby on Rails you can learn more about Ruby on […]

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.