
RoR stands for Ruby on Rails, its an open source we application framework for the Ruby programming language. It is planned to be used with an Agile development methodology which used by web developers for rapid development. In order to organize application programming Ruby on Rails uses Model-View-Controller (MVC).
For the new users of Ruby on Rails, you should learn about the three given tools. They will help you on working on Ruby in Rails. So here the three tools:
ERb
ERb means Embeded Ruby, and it is probably the coolest tools used on Ruby. ERb was written by Seki Masatoshi. Its major use is to put Ruby code inside an HTML file. ERb reads from word to word. At some point when it reads the Ruby code embedded in the document it sees that it has to fill in a blank. It does so by executing the Ruby code. Two things you need to know before preparing an ERb document:
(a) For Ruby code to be executed enclosed it between <% and %>.
(b) If you wish the result of the code to be printed as a pat of output enclose it in
<%= and %>
for an example save the code in erbdemo.erb. One thing which should be noted down is that a ruby file will have extension .rb but Embeded Ruby file’s extension will be .erb.
<% page_title = “Demonstration of ERb” %>
<% salutation = “Dear programmer,” %>
<html>
<head>
<title><%= page_title %></title>
</head>
<body>
<p><%= salutation %></p>
<p>how ERb fills out a template.</p>
</body>
</html>

Follow the above step with running program using the command-line utility erb
c:\ruby\>erb erbdemo.erb
This will produce the following results
<html>
<head>
<title>Demonstration of ERb</title>
</head>
<body>
<p>Dear programmer,</p>
<p>This is an example of how ERb fills out a template.</p>
</body>
</html>
Debugger
Ruby debugging tools can be found in the library file debug.rb. Debugger in Ruby will let you run your program one instruction at a time with pauses in between. At every pause you can inspect the variables or values of your code, locate your position in a series of nested commands and after all the inspections you can resume execution. Breakpoints is another feature of Ruby Debugger. Using the Breakpoint you can tell the debugger when to stop. Use of the Debugger varies from programmer to programmer. A programmer shouldn’t try to get quickly adapted to use Ruby, just because debugging is available on Ruby. You will find programmers who are comfortable with Debugger and some who aren’t. So Debugger is the matter of choice, but you should at least know that there is a tool available for Ruby.

Profiling
Afterwards when you start writing longer programs you will have to measure the resources. Especially how much time, is used up by parts of your program or as whole. This whole process is called Profiling. It is also used as fast code profiler for Ruby. You can do profiling using below command
$ ruby -r profile c2fi.rb
Some of the profilers for Ruby include:
Modes – Ruby can measure a number of parameters including memory usage, Call times, and object allocations.
Reports – can generate cross-referenced html reports and text
Recursive Calls – supports profiling recursive methods calls
Threads – It can support profiling multiple threads simultaneously
Profiling also identifies the areas in your program that are using a lot of resources of your system. One you will know the areas that are eating up your resources you can re-code the whole program and make it run efficiently.
