Ruby on Rails interview questions

Want to become an expert in cracking Ruby on Rails interview questions?

Start with practicing the questions below. Whether a question involves multiple choice or live coding, we will give you hints as you go and tell you if your answers are correct or incorrect.

After that, take our timed public Ruby on Rails interview questions test.

To use our service for testing developers, purchase one of the paid plans for companies.


1. Contacts Migration
Ruby on Rails Database migrations Public

Select all statements that are correct after the following migration has been executed:

class ContactsMigration < ActiveRecord::Migration
  def change
    create_table :contacts do |t|
      t.string :name
      t.integer :telephone_number
      t.text :address, null: false
      t.timestamps
    end
  end
end
Easy  
3min
Solve question

2. Employee Search
Ruby on Rails Database abstraction Public

A company database contains the following table, in which id is the primary key:

employees

id name age
1 Steve 21
2 John 44
3 Amy 26
4 Marcus 44

Select all the statements that return only the employee with name "John" (id = 2).

Easy  
3min
Solve question

If you feel ready, take one of our timed public Ruby on Rails interview questions tests:
  • Ruby on Rails online test ( Easy )
Not exactly what you are looking for? Go to our For developers section.