Closed KittyGiraudel closed 8 years ago
Damn, testes are failing. I will require your assistance here @sighmon. :)
Hey @HugoGiraudel & @pgoetze, cool idea - we re-implemented it so that it locates the MJML executable and checks the version at require time to avoid crashing at runtime.
We also avoided using /usr/bin/which mjml
in the hope it'll work on more operating systems (whispers Windows).
What do you think?
Hey there,
The
mjml_bin
method currently returns the output ofwhich mjml
command, which works fine when the module is globally installed but would fail to retrieve a binary when only installed locally.This pull request intends to fix that by first checking the content of the
node_modules
folder in the current Rails project, then falling back onwhich
if there is no localmjml
.One question though would be: do we have access to
Rails
in this file?Ping @pgoetze.