Setting up Ruby on Rails developer's machine

Shah Nawas Khan
4 min readApr 20, 2023

--

Setting up your machine to learn Ruby on Rails the first time should be easy. Yet, there are so many things that could go wrong that sometimes this tends to be hard. Especially if this is your first time learning programming.

This is why many resources out there would suggest using an online coding environment such as Github Codespaces, repl.it or Aws Cloud9 to start your Ruby on Rails learning journey. However, as a developer, you still need to get it set up on your machine eventually. You can’t just keep giving excuses that you can’t work when the internet went down.

You might then consider setting it up inside pre-packaged docker containers such as docker-ruby so that it takes away the hassle of setting it up yourselves. This is fine until the sound on your CPU fan gets louder than the heavy metal songs playing in your headphones.

In this guide, I am going to take you to set up the Ruby on Rails developers environment in your machine, as close to the metal as you can.

First, download this VS Code extension: https://marketplace.visualstudio.com/items?itemName=CodeZoomer.code-zoomer

Install CodeZoomer VS Code extension

I created this extension to make learning Ruby on Rails as easy and elegant as the Rails framework itself.

If you have downloaded and installed this extension, in your VS Code open the first lesson with the title “Getting Started”.

This lesson would bring you through installing and getting ready for your first development experience as an RoR developer. It is better to go through using the extension in VS Code as it gives you the convenience to run any of the terminal commands with a click of a button.

In the lesson, you would be taken to install all the necessary tools that are needed for your development machine.

If you are a Mac user, then first you would learn to setup Homebrew, a package manager to help you conveniently install other software you need.

Then, you would learn how to check if you have Git installed and make sure to get the correct Git version you needed.

In the next step, you will need to check what version of Ruby is installed on your system. Then you would need to install the correct version needed for working with Rails 7.

While we are at it, you would also learn how to switch between various Ruby versions in your machine using RVM. RVM would help you switch the Ruby version you use currently because when you want to work on a different version of Rails, you will have to switch to the correct Ruby version for the Rails version.

This would happen many times as a Rails developer you would come across multiple versions of the Rails project and you would need to know how to switch the correct Ruby environment for each project.

For reference, here is a list of Rails versions and which Ruby is it compatible with.

Finally, you would be installing Rails, and learning some terminal commands to work with your first Rails Hello World Project.

If you would further learn more about Rails, there are many free lessons in the Code Zoomer extension. This would get you quickly started with learning because the learning content and the code/projects live right on your VS Code IDE.

This extension offers bite-sized lessons on the Ruby on Rails framework that can be completed in less than an hour. Each lesson is focused on teaching a specific feature of the language and comes with a starter repository, so you don’t have to worry about tracking your project’s history.

With CodeZoomer, you can access the lesson content and run terminal commands directly within your IDE, making it a more convenient and efficient way to learn Ruby on Rails.

Or run the provided Rails Console commands in the lesson with a click of the Run button on the lessons page.

One of the most exciting features I have in mind for CodeZoomer is the ability to seamlessly integrate lesson content with a user’s project.

Now, it's common when you are just starting up, or even for experienced developers to face errors in their command line. If you happen to face errors and have already spent many hours searching StackOverflow or Google for a solution, I have create another tool to help you debug your command line errors quickly using ChatGPT.

Check out this CLI tool called gpt-comrade hope it can help you to smooth your learning journey.

--

--

Shah Nawas Khan
Shah Nawas Khan

Written by Shah Nawas Khan

I am a computer programmer, loves to learn and teach. I created Code Dryer to help developer save time from doing boring stuff. https://www.codedryer.com/

No responses yet