How to train senior developers in Ruby on Rails

It’s not uncommon for a company to acquire another one, and bring the developers along. Occasionally, these developers don’t have experience with the acquiring company’s tech stack.

If you’re in a leadership position supporting this transition, it’s now your job to train these developers. You have a new team of developers with lots of business context and web development experience but have never used your tech stack before.

In this post, I will share resources and strategies for helping you get them onboarded in the Ruby on Rails ecosystem.

Where are the new developers coming from?

The developers already have lots of experience and bring different perspectives to the team, which I find valuable and worthy of recognition. Before asking them to start over with Rails, it’s important to appreciate the insights they bring in.

Their existing skill set can help inform what parts of the Ruby ecosystem they will need more help with. For example, when my colleague Justin and Development Director Richard helped a client train Senior .NET developers in Rails, we took some time to evaluate what the key differences between C# and Ruby are.

For example:

  • C# is statically typed language. By default, Ruby isn’t (static type checking can be added with Sorbet and RBS).
  • C# developers don’t write as many tests because of types. Rubyists rely heavily on automated tests (TDD, yay!).
  • C# developers tend to use Windows computers and IDEs with extensive graphical user interfaces. Rails developers primarily use MacOS and often prefer the command line.
  • In C, Rust, and several other languages, the program starts with the main function. In Ruby, any file can be passed to the ruby executable, and it will run from the top level.

Comparing the differences between the two stacks will help you identify what is crucial to have them trained in, and anticipate any frustrations along the way.

Ruby before Rails

It’s tempting to go straight to Rails, but I’d advise against this. Rails is a framework that does a lot for us, and its magical, behind the curtains features, can be extra confusing for those who haven’t even see Ruby yet. Being completely honest, even I find Rails too magical sometimes πŸ˜…

Rails is built on Ruby and having a solid foundation in Ruby will pay off. Besides that, as we saw above, there are other parts of the ecosystem that the team will need to get used to.

For this first step, it’s important to spend some time on getting a good feel for Ruby. Let’s see how.

Hello Ruby

As mentioned above, in this training we did recently, the developers used Windows and Visual Studio. The Ruby and Rails teams have invested a lot in improving its tooling on Windows machines, but it’s still not anywhere close to the experience you get when using a MacOS or Linux machines.

For that reason, I recommend playing with Ruby using online interactive consoles. It provides a shorter feedback loop while learning Ruby’s syntax, how to define methods, how to use variables, etc, without going through the frustration of having to setup Ruby on Windows.

This is where Exercism shines because they provide an easy online editor.

I recommend picking up a sample of exercises to get them exposed to Ruby’s syntax, and its perks. Here are some suggestions:

Other resources shared by Matheus Richard:

Because Ruby is new for the team, those exercises are a good start for the first week. It’s important to have someone with a Ruby background available to check in and pair with them. Since the trainees have a fresh perspective, they will ask great questions, and probably things we don’t even think about anymore. Who knows… your team might learn one or two things from the trainees ;)

Getting familiar with the command line 🐚

If they are not used to running commands in the command line, transitioning to Ruby can be frustrating. I highly recommend dedicating some time to get familiar with the shell and trying things on their machines.

For this part, I recommend this Mastering the Shell course. I also found this Shell Scripting: A Complete Guide tutorial helpful.

The most important concepts to practice here are basic commands such as ls, cd, mkdir, rm, grep, cp, etc. and managing processes.

Installing Ruby

Once they are more familiar with Ruby and the command line, it’s time to get Ruby running locally.

We recommend using asdf to manage Ruby versions.

At this point, they can start writing small Ruby apps locally. For example: a CLI app using Thor, or even solving more involved exercises from Exercism locally using Exercism’s CLI:

I also recommend the following Upcase materials at this point:

Be mindful though that this is a lot and it’s important to promote taking breaks to consolidate the learnings.

Testing Ruby for beginners

Testing is a big part of Ruby. Even if your codebase uses RSpec, Minitest syntax is much simpler to explain to a beginner. For example, expect(foo).to eq 3 is very magical, while assert_equal 3, foo is likely similar to other languages.

There are lots of materials for RSpec and not a lot for Minitest. As an intro, suggest following this Minitest material. Give them time to get used to Minitest syntax. Then, explore how your codebase tests Ruby.

Something important to mention here: if the trainees are not yet familiar with testing, I highly recommend having Ruby devs pairing with the trainees. Testing is a whole new skill, and pairing is one of the best ways to get used to it.

If they want to explore testing further, share these supporting materials with them:

Test-driven development (TDD) is a lot to introduce at this point. I’d stick to Testing After Development (TAD) for now. If some trainees are up for the challenge, then they can practice TDD either by pairing with one of your developers, or by following the supporting materials above.

It’s time to board the Rails train

Time has come! After a solid foundation with Ruby, it’s time to introduce Ruby on Rails.

In terms of materials, we used The Odin Project. It’s a comprehensive tutorial that will give them a good background in Rails. It also provides exercises with detailed instructions. If anyone in the team prefers a more structured approach, I recommend Agile Web Development with Rails 7. I remember finding it helpful when I was learning Rails.

Following a tutorial will give them the opportunity to get familiar with Rails by creating small Rails apps. It’s a good idea to check in with them to know if they are ready for more.

Once they are ready for more, you can start introducing unique features that your app relies on. It’s helpful to ask yourself:

  • What are some concepts that are crucial to your app? For example: Does it use engines? Is it an API-only app?
  • How many hours per week can your Ruby devs pair with the new devs (having the trainees being the drivers)?
  • What are some “onboarding tasks” that you could create/assign to them to practice along the training period?

Having a combination of theory sessions explaining the features you identified above, pairing and onboarding tasks once they are more familiar with Rails is a great way to spend their time at this point. It will also help them transfer what they are learning into a real-world app.

Having mentors to pair with the trainees on onboarding tasks will go a long way. Working on the codebase will surface things they don’t know they don’t know, and give them a nice experience of contributing to the codebase. Remember that these are “onboarding” tickets and should contain a clear description of the problem, an acceptance criteria, as well as any links to areas in the code to guide them.

At this point, you can also teach them how to use the command line to grep routes, use Rails console, find multiple files in the codebase using shell commands, etc.

Bonus supporting materials:

From here, they are ready for contributing more to the codebase and have more ideas on what concepts they need to explore further. To deepen their Ruby and Rails skills, I recommend the following materials:

Break the ice: fun activities while learning Ruby & Rails

A fun activity to try during the training is having them share “What is wrong with Ruby?!”, i.e. things they found weird/different in Ruby coming from other languages. It can be a fun exercise to do as a group in a call and can serve as a space to vent. Even though we love Ruby, it can be a lot for a beginner.

Other activities could be inviting them to share their progress in “Show & Tell” sessions, scheduling mob pair programming sessions, and playing fun games such as “Who Wants to be a Ruby Engineer?”.

Be kind and supportive

Mastering any new skill takes time. Going through any training requires digesting lots of information, so remind everyone to be patient and celebrate the wins often.

Besides the technical part of it, it’s important to stop for a moment and ask yourself how you would feel if suddenly your job changed its tech stack entirely and you can’t be as productive as you were. It’s uncomfortable, right?

Folks getting onboarded with Rails will experience anxiety around their job, and it’s important to express the message that you don’t expect them to be senior Rails devs right away – it will take months. Encourage them to ask questions, pair, and contribute to the codebase as they can, while pushing their comfort zones just enough, without being too overwhelming.

As part of my last client’s project, we helped train a group of Senior .NET developers get up to speed with Ruby on Rails. It’s wild how few opportunities we get to be complete beginners as adults. Starting over again can be frustrating and scary – but it doesn’t have to be!

Hopefully, this post gives you a plan to get started, and get new Rails developers contributing to your team. If you are in that position and need support on training your new senior developers in Ruby on Rails, reach out to us. We’d love to help and train more developers in Rails with your team.


Thank you, Matheus Richard, Justin, and Sara Jackson for reviewing this post 🧑