Engineering and educating for a free and open web.

Ruby logo Ruby on Ruby on Rails logo Rails developer with four years of industry experience.
Experienced with Turbo logo Hotwire, ViewComponent logo ViewComponent, and more.

nvar 24 Sep 2020
I built a Ruby gem to ease managing environment variables in Ruby apps.

While I was at, one early problem to solve was improving the developer experience. At the time, I was working alongside a designer and later another developer, so the app environment needed to be easy to set up and configure. One way in which this was achieved was through Scripts to Rule Them All, but a novel way I introduced was to have all required environment variables checked at boot time. After was retired, I released the source for this as nvar.

nvar allows Ruby developers to specify the environment variables used within their app, whether or not they are required, and whether or not they need to be censored from requests recorded in tests via VCR. The aim is to centralize all configuration linked to environment variables through nvar. It works very well when paired with dotenv-rails, but doesn't require it.

The initial feature of checking the environment at boot time was key to ensuring a good developer experience at, but the features that followed on from that evolved nvar into what I believe to be an indispensable tool for Rails developers.

Made with...