Rerun, Speeding up Ruby on Rails Development by Putting things on Loop

Baldomero Vela III
2 min readJul 19, 2021
Sprinting toward the finish line. Source: Getty Images

Final project time, at long last it’s time to flex new React knowledge by putting together a full-stack web application that marries a React front end with Redux state management to a backend Ruby on Rails API, with a SQL database. So how about a few more beats from the home stretch? First I’ll break down how the Rerun gem makes tweaking a Rails development server a bit faster. Followed up with how to use the built in environment key management system in Rails, can help you encode private keys, without needing a third party gem like Figaro. Then I’ll give a brief run down of how the Redux Toolkit helps simplify managing state and enables a host of asynchronous actions.

Part I: Ever get really tired of manually starting and stopping the Rails server?

Rerun, by Alex Chaffee is an application handler written in Ruby. Basically, you download and install the gem. When called, Rerun will launch your program and monitor the surrounding file directory for changes. When the gem detects an update, it will terminate and restart the process you called it on. Check repo below for great instillation instructions.

Once Rerun was installed in the development environment. All that’s needed to start the application is $ rerun rails s If you need to specify additional parameters for your Rails server such as a different port number, pass the launch command to rerun in quotes like this: $ rerun "rails s -p 8000"

--

--