Looking for top software development talents? They are just a few clicks away.

How to Interview Ruby on Rails Developer To Secure A Great Hire?

Sep 166 min read

Miłosz Kaczorowski

Co-founder at Ideamotive. Technological advisor and software consultant.

What do you need to know about Ruby on Rails in 2020?

 

Ruby on Rails is an open-source full-stack web application framework. It is an efficient and mature platform with a steadily growing number of users.

There are almost 100.000 websites based on RoR in the USA alone. Some of them get over 200M visitors monthly! If you want your company to join them, you will need an expert developer. In this article, you will learn what Ruby on Rails interview questions will ensure a great hire.

Hiring Ruby on Rails developer

You should follow a structured recruitment process. One crucial stage is the interview. Repeating the same procedure will help you compare candidates regarding the same factors. And what are the factors?

 

Good developers should have certain soft and hard skills. Soft ones are usually common for all developers. But hard, technical skills will be specific for certain technology. Here are some technical skills Ruby on Rails developers need.

  • Ruby on Rails expertise
  • Database understanding
  • CI/CD principles knowledge
  • Front-end skills (HTML, CSS, JS)

As part of the candidates’ selection, you may plan to use test tasks or assignments. Keep it short. You don't want to discourage your candidates with tons of work before you even hire them, and you don't want to spend too much time evaluating the outcome as well.

20 Ruby on Rails interview questions and answers

I know there are virtually thousands of questions you can ask about Ruby on Rails or any other programming language. It doesn't make sense though. It takes time and adds very little to your knowledge. What to do then? Ask precise questions that will really let you know if the candidate sitting in front of you is the one that you need. So, it's time for you to find out what are the 20 questions you really need to hire great Ruby on Rails developer.

1. What is the difference between Ruby and Ruby on Rails?

Ruby is an interpreted programming language. Ruby on Rails ("RoR") is a server-side web-application framework that was written in Ruby. Although you can develop software with pure Ruby, it’s much more effective with RoR.

2. What are alternatives to Ruby on Rails?

Node.js based frameworks like Meteor, that allow you to build web apps with JavaScript. Another popular solution is Django. It's Python Web Framework.

3. What was the last project you worked on involving Ruby on Rails?

It is an open-ended question. Listen carefully to the answer and try to find out how advanced is your candidate and what kind of experience he or she has. This question can also show how passionate the candidate is and programming is still a job for passionate people.

4. What are the limitations of Ruby on Rails?

A good developer should know his tech stack limitations. It’s no different for RoR. Ruby on Rails comes with heavily opinionated tools and while it’s easy to build an app with gems and plugins, it takes much time and effort to build something truly innovative. The main limitations of Ruby on Rails come from how Ruby MRI handles multithreading and how it may impact performance, but from a feature standpoint there are fewer and fewer things that have to be hacked - e.g. lately support for connection to multiple database servers was added.

5. What are the advantages of Ruby on Rails?

Ruby on Rails has lots of advantages too. As an open-source solution, it is cheaper and more popular than others. Ruby on Rails still tries to keep the edge of its earlier releases by adding innovative features all the time, but at the same time, it's much more mature. The team behind RoR is experienced and constant, which gives big stability to the project. The biggest advantage of RoR is the speed of MVP development that is allowed by built-in solutions to common problems (WYSIWYG forms, mailing, WebSockets, asynchronous tasks, file uploads). Also, a plethora of gems and plugins are easily available to expand RoR capabilities, for example with easy to build administration panels or user account systems.

 

Together with a growing community of experts, these factors make RoR cost-efficient and developer-friendly.

Asking your candidate about the advantages and problems with particular technology will also help you find out how they’re looking at software development in general.

6. What are popular RoR Software design patterns

There are many design patterns that enhance the efficiency of software development. Among the most popular in RoR development, there are Service Objects, View Objects, Query Objects, Decorators, Form Objects, Value Objects, Policy Objects, Observer pattern, and Singleton pattern.

7. What are Ruby gems?

They're Ruby libraries that enhance the capabilities of web-application development. There is a gem for virtually anything you might need in Ruby on Rails development.

8. What is the difference between a gem and a plugin in Ruby?

You install a gem on a machine. It's available for all Ruby applications running on that machine.

A plugin is installed for a particular application in a folder. Only that specific application can use it.

9. What Ruby on Rails gems do you know and which have you used?

This open-ended question is valuable because it gives your candidate an opportunity to present their familiarity with the tech stack and a personal approach towards Ruby on Rails development. The most popular gems include Devise for user registration/login, Rubocop for code linting and RSpec for unit testing.

10. What is the difference between a Symbol and String?

Both string and symbol are a sequence of characters, but each string is its own object in memory (even if they contain the same sequence of characters), while symbols with the same name are always the same object. That makes strings mutable, while symbols are not. There is a subset of methods available only for strings, but using symbols where applicable is highly recommended due to less memory impact and higher speed. 

11. What is DRY code? (Don’t Repeat Yourself).

The main principle in Ruby on Rails development is to keep the code DRY. It means “Don't Repeat Yourself”. It makes the code more concise. Every bit of application logic that does a particular thing should appear in code only once - this way you don’t have to change code in multiple places when you want to change a specific behavior. Opposite to DRY is WET - Write Everything Twice. It states that it’s only reasonable to refactor code when there are at least three occurrences of the same logic in the codebase.

12. Does Ruby support constructors? How are they declared?

Yes, Ruby supports constructors. You declare them with the method “initialize” and def keyword.

13. What are the most common Rails mistakes that increase page load time?

  • No indexes on columns in the database resulting in longer queries execution;
  • Unnecessary eager loading resulting in too many queries sent to a database;
  • Using too many gems, which makes Rails processes to big and affects performance;
  • Obese Model in MVC - it may result in unnecessary or irrelevant methods.
  • Setting the read_timeout value too high;

14. What is a module?

It’s a collection of methods, constants, and class variables. Such a collection is a separate unit with its own, separate name. You define a module similarly to a class, but with a module keyword instead of a class keyword. With modules, it’s easy to avoid clashes with existing classes, methods, and constants.

15. What deployment tool do you use? What other do you know?

The way your candidate answers this question will tell you how familiar they’re with top-notch tools. Another thing is whether they know and have used the tools used in your company. The most popular will include CI/CD solutions, like Jenkins or GitLab CI, but Capistrano also might be a valid answer.

This question also allows telling what importance a candidate attaches to deployment automation, and automation is one of the key things while working in an Agile environment.

16. How can you implement caching in Rails?

There are various out-of-the-box solutions for caching in Ruby on Rails. Among the most common you will find Fragment caching, Page caching, and Action caching. Yet another way is to nest the cached content in other content (also known as Russian doll caching).

17. What is ActiveJob?

Active Job is a framework for declaring jobs that run in parallel to the main request-response application cycle. When you write your jobs to Active Job you don’t need to worry about API differences between various job runners, as Active Job behaves as a layer between job definition and job runner.

18. What is Active Record in Ruby on Rails?

It is an ORM framework. ORM framework is a layer responsible for representing business data and logic. It ensures that the relations of objects in a database are maintained. Moreover, with Active Record you don’t need to use pure SQL to search and query a database.

19. What are available relations in ActiveRecord?

ActiveRecord provides three main relations: one-to-one, one-to-many, and many-to-many. You chose the relation by declaring: has_one, has_many, belongs_to, or has_and_belongs_to_many.

20. What is a Rails engine?

You can think of engines in Rails as miniature applications. An engine provides functionalities that will be contained by a host application. An application can be described as a compilation of engines.

Very often you won't need to ask all these questions. In fact, sometimes just a couple of them will help you find out what's the level of proficiency of the interviewed candidate. Depending on your requirements you can focus either on the basic or the advanced Ruby on Rails interview questions.

Interviewing a RoR developer - who should you have onboard?

There is one more thing that will help you with the interview and selection process. It is your team. To build an efficient interview team you will need to gather people with skills that complement each other.

Your CTO or Tech Team Lead will keep an eye on technical nuances. He or she will make sure your candidate really knows the ropes. HR specialists will take care of the soft skills and company culture, as well as legal and hiring process-related issues. Senior RoR developer will be there to evaluate test assignments and clarify any Ruby on Rails specific issues.

Hiring a Ruby on Rails developer - what else do you need to take into account?

It's not enough to find and recruit a Ruby on Rails developer who presents a requested level of software development proficiency. There are also a few other issues important for a successful collaboration.

Mainly in highly specialized industries, it is important that your developer understands the business environment. Similarly, you want your new expert to fit into the company culture. To understand and share the same values. Last but not least, the costs. How to hire a highly experienced Ruby on Rails developer and still keep eye on the cost-efficiency?

How to secure a great hire?

Simply, let us know. We will connect you with top RoR talents perfectly suited for your industry, company culture, and budget. Our high-end matching algorithms and experienced team make sure you hire exactly the specialist you need.

Miłosz Kaczorowski

Co-Founder of Ideamotive. Highly skilled in Ruby on Rails, JavaScript and Linux System Administration. Experienced in implementing effective web apps.

View all author posts

Looking for a specific type of software development service?

Take your business to the hypergrowth phase.

Work with software development experts from Ideamotive's talent network.