Closed NobodysNightmare closed 5 years ago
@NobodysNightmare Have you looked into why the build is failing? https://travis-ci.org/sighmon/mjml-rails/jobs/571202562
Whoops, I didn't notice. Specs are passing locally for me in these cases:
npm
installedyarn
installedThe only way they fail for me is when none of them is installed (since I don't have a global installation of mjml
).
I just fixed an error for the latter case, where I initially forgot to check whether we found an installer_path
.
I still can't explain the CI failure though, but it seems clearly related to my changes :(
I did a bunch of printf debugging to no avail.
My last attempt was reverting my changes: https://travis-ci.org/sighmon/mjml-rails/jobs/572624305
This run is essentially identical to the master
branch, but failed as well... So I suppose something has happened to the CI pipeline in general, that made the build fail?
I finally figured out what the problem was. Essentially the same thing happened to us as well: One of the dependencies of mjml
now requires a more recent version of nodejs.
By letting nvm install node 10 the CI turns green.
Hey @sighmon, is there any update from your side on this?
(Trying to use a mention here, in case you just "missed" my updates because of notification settings... if you are just busy: sorry for the additional mentioning)
@NobodysNightmare Thanks so much for the update - looking through it slipped off my list, but found some time to look through it tonight. I've merged and pushed it now.
This pull requests fixes discovery of the
mjml
binary, when there is only yarn (but no npm) installed.In case a binary called through backticks is missing, ruby will raise
Errno::ENOENT
.Thus the previous code failed to discover the bin path, when npm was not present on the system, because an error was raised immediately.
Reproduction
On a system that has
yarn
installed, but nonpm
(e.g. in a docker image) try booting your Rails application. Prior this PR, it should error out: