Other tools 🛠

When your project starts growing you will need a lot of different tools running in order to mimic your production environment. Let’s say you have a detached React app, that locally is provided by webpack-dev-server , you have some Sidekiq queues for background processing, and for those you also need Redis to be run. All of this plus your rails server, of course. I bet you have a lot of console tabs to look at right now. 🤓 Foreman is a tool that allows you to define multiple processes to run in a Procfile. When you run Foreman against a Procfile it will start all the commands you listed, and have them nicely outputting in the same console window with different colors. It’s a great way to have all the logging accessible in the same place.

When you’re integrating an external service it’s not unusual that you need to receive some callbacks. When developing locally you’ll have a hard time trying to do that. ngrok is a tool that provides you a way to route traffic from an HTTP(S) address to a specific port on your localhost server. This way, you can use that address when setting up your callback URL in the external service, and you’ll receive the callbacks right inside your Rails app. Cool, right?

On the other hand, if you’re focused in the frontend and you would like to have Rails info available from inside a Google Chrome instance, this is your lucky day! RailsPanel is an extension for Chrome that will add a new Rails tab to your developer tools panel. It provides detailed information about all the requests to your Rails app, like the incoming params, the database queries performed, rendering time and more. A must-have if you don’t want to leave the browser to discover what went wrong. 🤫

Last, if you need to write a long-running task and you’re thinking about a good way to display its progress, don’t bother. 🙈 Someone already did that for you, and it works really well. Ruby/ProgressBar is a handy way to provide that feedback, with lots of customization and formatting options. It can even display an estimate on the remaining time for you, based on the total you defined and the elapsed time. 👏