Here you can find Ruby On Rails Interview Questions and Answers.
In this Ruby On Rails Interview Questions and Answers section you can learn and practice Ruby On Rails Interview Questions and Answers to improve your skills in order to face technical inerview by IT companies. By Practicing these interview questions, you can easily crack any Ruby On Rails interview.
AllIndiaExams provides you lots Ruby On Rails Interview Questions and Answers with proper explanation. Fully solved examples with detailed answer description. All students, freshers can download Ruby On Rails Interview Questions and Answers as PDF files and eBooks.
You no need to worry, we have given lots of Ruby On Rails Interview Questions and Answers and also we have provided lots of FAQ's to quickly answer the questions in the Ruby On Rails technical interview.
What is Ruby On Rails?
Ruby on Rails is an open source full-stack web application framework written in the Ruby Programming Language. Rails is capable of gathering information using pages and applications from the web server and can interact with a database and can retrieve information from the database.
Why Ruby on Rails?
1.CRUD (convention over configuration) 2. DRY Principal (Do not repeat Your self ) 3. Gems and Plugins 4. Pure OOP Concept 5. Scaffolding 6.. Rest Support 7.Action Mailer 8. Rake support 9. open source 10.Rpsec Suppot for testing
Explain how (almost) everything is an object in Ruby?
This is a simple question based on complex concept. Here’s your chance to show off your theoretical knowledge and demonstrate that you can have an in depth conversation on class hierarchies, inheritance, methods, encapsulation, polymorphism, and more. Explaining this could take an hour or a few minutes – there’s no single correct answer here, save from being able to demonstrate your familiarity with OOP concepts.
What’s your favorite testing tool?
The specific answer here is probably not important in and of itself – What’s important is that you can demonstrate familiarity with at least several testing tools, and be able to discuss their individual advantages and weaknesses. Never ventured outside of Rails default testing tools? Take some time to familiarize yourself with tools such as Rspec, FactoryGirl, Capybara, and Cucumber.
What are Gems and which are some of your favorites?
Gems are packaged bits of Ruby code that you can install to extend or add functionality to your app. Be sure to be able to discuss a list of your favorite gems, why you like them, and any customizations you like to add. This is also a good opportunity to highlight any gems you may have published.
What is a class?
You should easily be able to explain not only what a class is, but how and when you would create a new one as well as what functionality it would provide in the larger context of your program.
What is the difference between a class and a module?
The straightforward answer: A module cannot be subclassed or instantiated, and modules can implement mixins.
What is an object?
Textbook answer here is that an object is an instance of a class and has state, behavior, and identity. In a plain text example, you can say that a truck and a car are both objects of the class Vehicle, or that apple and pear are both objects of the class Fruit.
How would you declare and use a constructor in Ruby?
Constructors are declared via the initialize method and get called when you call on a new object to be created. Using the code snippet below, calling Order.new acts as a constructor for an object of the class Order. class Order def initialize(customer, meal, beverage) @customer = customer @meal = meal @beverage = beverage end end
How does a symbol differ from a string?
Symbols are immutable and reusable, retaining the same object_id.