sighmon / mjml-rails

MJML + ERb/Haml/Slim view template
https://mjml.io
Other
300 stars 65 forks source link

Couldn't find the MJML 4.0. binary #35

Closed joeczucha closed 6 years ago

joeczucha commented 6 years ago

Hi folks,

I'm having a bit of trouble getting the library to detect my MJML 4.0. binary. I installed MJML globally, using Yarn and I am using gem 'mjml-rails', '~> 4.0.0'

$ mjml -V
mjml-core: 4.1.0
mjml-cli: 4.1.0

$ which mjml
/usr/local/bin/mjml

$ rails c
Running via Spring preloader in process 24555
Loading development environment (Rails 5.1.3)
[1] pry(main)> Mjml.discover_mjml_bin
Couldn't find the MJML 4.0. binary.. have you run $ npm install mjml?
=> nil

Do I need to add some additional config?

Thanks,

Joe

joeczucha commented 6 years ago

Ah, just like that I solved my own issue 👍

For future Googlers: you should ensure that the gem version matches the mjml version. In my case, I should have been using: gem 'mjml-rails', '~> 4.1.0'

All working now!