In a few previous articles, ( Solr on Rails, Efficiently Run and Maintain Your Rails Application, Running Rails Apps Simultaneously During Development) I’ve recommended using Foreman to run your Rails applications in order to maintain the best development and production parity. However, it would appear that out of habit, I’ve been wrong on this for the last year, as Heroku has replaced Foreman in the toolbelt with Heroku Local).
So, still keep your Procfiles the same, but launch them with
heroku local -fProcfile.dev rather than
foreman start -fProcfile.dev.
One noticeable improvement is that Heroku Local is more verbose about your .env file on boot, which is fantastic.
I’ve had a few days that started out poorly because of a typo in my
.env that snuck in and completely killed a few hours hunting down invisible bugs that didn’t exist. As a side note, when that happens, step back after a few minutes, take a breather and down an espresso. You’ll come back much clearer.
I noticed this deviance in my current behavior when I was about to sit down and write an article on the importance of knowing and abiding by the 12 Factors. Instead, I found a few seconds in that my own Factor X had slipped. Best to publicly remedy it in case anyone else read it in past articles of mine.
If you enjoy having free time and the peace of mind that a professional is on your side, then you’d love to have me work on your project.