Dotenv/dotenv-rails 1.0 breaking apps

I noticed that yesterday’s bump from 0.11 to 1.0 broke several integration tests in my application (template files cannot be found even though they are present). Posting here to see if anyone else had a similar problem, no issues have been filed against the gem’s repo as of yet for this version bump.

Update in case anyone has had a similar problem: I found that dotenv-rails 1.0+'s different Railtie configuration resulted in some of my gems not being loaded properly in development and test environments, with the culprit for many of my test failures being Haml no longer being loaded.

In order to reduce memory footprint I group some dyno process type specific gems (so only Web dynos would load Haml or presentation-specific libraries, etc.). I was able to resolve the issue by moving those gems into the general group rather than only loading them by dyno type. Clearly not a great solution. I realize that my configuration is a little unorthodox, but since dotenv is very popular I wanted to post just in case someone else finds it relevant.

1 Like