Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
This is my Ruby interview cheat sheet. Feel free to fork it, Use it, Share it, or do whatever you want with it. PLEASE let me know if there is any error or if anything crucial is missing. I will keep updating...

Ruby and Rails Interview Questions


  • What is a class?
  • What is an object?
  • What is a module? Can you tell me the difference between classes and modules?
  • Can you tell me the three levels of method access control for classes and modules? What do they imply about the method?
  • There are three ways to invoke a method in ruby. Can you give me at least two?
  • Explain this ruby idiom: a ||= b
  • What does self mean?
  • What is the difference between lambda, block and proc?
  • How do you sort an Array of objects by a particular attribute? What is a better way to do sorting with ActiveRecord?
  • What are some of your favorite gems? What are their alternatives?
  • In Ruby, which is generally the better option: a recursive function or an iterative one?
  • What are #method_missing and #send? Why are they useful?
  • What makes Ruby different from other programming languages?
  • What do you mean by Meta Programming?
  • Explain how everything is an object in Ruby.
  • How would you explain the Ruby OOP model?
  • Define block, proc and lambda and give difference between them.
  • What is difference between String and Symbol?
  • What is difference between includes and extends?
  • What is difference between ==, ===, eql? and equal??


  • What is new in Rails 4?
  • What are the advantages and disadvantages of using Ruby on Rails in Web Development?
  • Explain MVC in terms of Rails.
  • Explain the different pieces of Rails or What are different components of Ruby on Rails?.
  • Walk through the flow of a request through Rails.
  • Give list of frameworks which is similar to Rails.
  • What are the different server options for running a Rails/Rack app?
  • Explain CSRF and how Rails combats it.
  • Explain mass-assignment vulnerability.
  • What is Rack?
  • What is middleware? How does it compare to controller filters/actions?
  • Explain various forms of caching available in Rails.
  • How is something like 30.seconds.ago implemented?
  • Give difference between last 3 versions of Rails.
  • What are the major improvements in Rails 5.0?
  • What do you mean by ORM?
  • What is Self-Referential Association aka Self Join?
  • List down types of associations in Rails.
  • What is functionality of Helpers?
  • Explain eagerloading.
  • What is ActiveRecord?
  • Explain Active Record Callbacks.
  • Explain Filters.
  • Define resource, resources, collection and namespace in terms of routes.
  • What things we can define within Model?
  • What is Asset Pipeline?
  • How parsing has been done from ERB file to HTML?
  • What is difference between Render and Redirect?
  • What is difference between Gems and Plugins?
  • What is difference between save and save!
  • What is difference between find and find_by_xxx method?
  • What is difference between form_for and form_tag?
  • What is difference between Application Server and Web Server?
  • List down servers supported by Rails.


  • What is difference between TDD and BDD?
  • What are the testing tools available for rails and which one you have used ?


  • What do you mean by Agile Development?
  • What is difference between Gemfile and Gemfile.lock?
  • What are your favourite Gems?

Contributions are most welcome

  • Please make sure that questions are unique
  • You can submit your answer too.
  • Question must be related with Ruby/Rails (Preparing a diffrent gist for Data Structure and Algorithms)


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.