The template sets ENV = :prod which forces the render_file method to open files, like initializers, from the master branch. If the file doesn't exist on master, open-uri will throw an error and stop the generation.
I've changed a conditional to read from a local version of the file if the read from the master branch fails.
The template sets
ENV = :prod
which forces therender_file
method to open files, like initializers, from the master branch. If the file doesn't exist on master,open-uri
will throw an error and stop the generation.I've changed a conditional to read from a local version of the file if the read from the master branch fails.