1) What is Ruby on Rails?
It is a server-side web application framework.
It is an open source ruby framework which is used for developing database-backed web applications.
Here, no compilation phase is required and it allows you to write less code than other languages and frameworks.
2) What are the features of Ruby on Rails?
Features of Ruby on Rails are:
- Rails API
- Action view
- AJAX library
- Action Mailer
- Customized library
- Actionpack Assertions
- Symbol garbage collector
3) What are the types of Rails Script used in Rails application?
The types of Rails Script are:
- Rails Console
- WEBrick Web Server
4) Who is the inventor of Ruby on Rails?
Ruby on Rails is written by David Heinemeier Hansson.
5) What is super function in Ruby on Rails?
Super function is used to invoke the original method.
6) Which command is used to create a controller for subject?
Command used to create a controller for subject is:
C:\ruby\library> ruby script/generate controller subject
7) Mention what is the command to create a migration?
Command used to create a migration is:
C:\ruby\application>ruby script/generate migration table_name
8) What is RVM in Rails?
RVM stands for Ruby Version Manager.
It is also known as a command line tool.
Here, with RVM you can easily install, manage and work with different environments.
9) What is Controller in Rails?
Controller in Rails is the logical center of your application. It is used to coordinate the interaction between the user, views, and model.
10) What is ORM in Rails?
ORM stands for Object Relationship Model.ORM indicates that your classes are mapped to the table in the database, and objects are directly mapped to the rows in the table.
11) What are the types of variables available in Ruby class?
There are four types of variables available are:
- Local Variables
- Global Variables
- Class Variables
- Instance Variables
12) What are the methods to install Rails?
There are three methods to install Rails are:
- Using rbenv
- Using rvm
- From source
13) Write a command to update RVM in Rails?
Command to update RVM in Rails is: rvm et head
14) What are the types of filters are there in Rails?
Types of filters are:
- Before filters
- After filters
- Around filters
15) Write the command to run migration in Rails?
Command to run migration in Rails: rake db:migrate
16) What is ERB in Rails?
stands for E
uby which is written by Seki Masatoshi. It allows you to put Ruby codes inside an HTML file. ERB also helps in executing the Ruby code.
17) What are the conditions required to prepare an ERB document?
The conditions required to prepare an ERB document are:
- If you want some Ruby code to be executed: enclose it between <% and %>.
- If you want to print the result of the executed code, as a part of the output, enclose the code between <%= and %>.
18) What is the file extension of Ruby on Rails?
is the file extension of Ruby on Rails.
19) Which command is used to run the program by using command line utility?
The command used to run the program is: erb filename.rb
20) What are the software's required to develop a web application using Ruby on Rails?
The software's required to develop a web application using Ruby on Rails are:
- The Rails Framework
- A Web Server
- A Database System
21) Which command is used to check the Ruby on Rails version?
The command used to check the Ruby on Rails version is:
22) Which tool is used to install Ruby on Rails on LINUX?
(Ruby Version Management Tool) is used to install Ruby on Rails on LINUX.
23) What is rbenv?
It is a lightweight Ruby Version Management tool.
- Easy installation procedure to manage various versions of Ruby.
- Solid environment for developing Ruby on Rails applications.
24) What is gem in Ruby on Rails?
It is a keyword which is used for installing the supported dependencies in Ruby on Rails.
25) What are the three types of associations supported by Active Record?
The three types of associations supported by Active Record are:
26) What are the valid column options available in Ruby on Rails?
The valid column options available in Ruby on Rails are:
27) What is the syntax for creating a migration in Ruby on Rails?
The syntax for creating a migration is:
application_dir> rails generate migration table_name
28) What are the three levels of Rails Caching?
The three levels of Rails Caching are:
29) What are the Validation Methods available in Rails?
The Validation Methods available in Rails are:
30) What is REST in Rails?
stands for RE
ransfer. It uses HTTP Protocol for data communication. In REST, everything is a resource.