-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
followed all steps for heroku but still getting missing binary message. #49
Comments
hmm.. even locally when I do execute |
@joshkestenberg perhaps try the latest version in "dependencies": {
"mjml": "~4.3.1"
}, I don't have a lot of experience with npm either, but maybe try installing it globally with |
I tried both updating
I appreciate the help. I'll wait til I actually start using the library to see whether or not the message I'm receiving is actually an indication that it's not working, or just a bug in and of itself. |
@joshkestenberg Ah, you're on the beta - I wonder if I've only ever tested against release versions. |
@joshkestenberg I tried it on the command line... maybe you can try this too and see if it works for you: rails c
IO.popen("mjml --version") { |io| io.read.include?("mjml-core: 4.") }
=> true To simulate the beta I used: rails c
"mjml-core: 4.4.0-beta.1".include?("mjml-core: 4.")
=> true So it still seems as though your Ruby environment can't see |
I have this warning on every deploy on Heroku, but the mjml stuff in my app actually works fine. I think it's something to do with the order the node stuff installs but I'm not sure, and the config changes I tried made no difference... I gave up worrying about it in the end. |
@denny Does # config/initializers/mjml.rb
Mjml.setup do |config|
config.mjml_binary = "/path/to/custom/mjml"
end |
Facing this same problem. |
@sandip-mane Do you have an example project you can point me to with the code you're running? |
@sighmon I work with @sandip-mane and we've been trying to fix the issue for a week now. I've created another sample repo which we use as a base for all our projects, and I've added MJML to it. It's a Heroku-ready repository and it also faces the same issue. https://github.com/vinay0x/wheel Things we've tried:
Any help would be really appreciated. |
@vinay0x Have you added a heroku build pack for it at index 1? |
Same here. Node.js buildpack is at index 1. |
@sandip-mane Did you try moving the |
@sighmon Yes, I had tried doing the same with @sandip-mane but to no avail. |
@sandip-mane @vinay0x When you $ heroku run bash -a newint
Running bash on ⬢ s... up, run.4106 (Standard-1X)
~ $ which mjml
/app/node_modules/.bin/mjml |
We're having the same issue, getting the same errors. Tried most of the same things mentioned by @vinay0x (1 and 3, was about to try 2). Currently trying 4.6.1 of the gem and npm package. When I bashed into Heroku, I got:
|
@fpjoe What do you see during a deployment for this section: remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpacks:
remote: 1. heroku/nodejs
remote: 2. heroku/ruby
remote: -----> Node.js app detected Are you running more than two buildpacks? Is nodejs definitely first in your deploy logs? |
This can help as well.
message. The trick was to add In the end, we forked the desired build pack and then ran the install of MJML version 4.9.0. To check the version of Mjml, we used -> irb(main):004:0> Mjml.mjml_binary_version_supported
=> "4.9.0" And to verify that it finds the executable we used -> irb(main):001:0> mjml_bin = `which mjml`.chomp
=> "/app/node_modules/.bin/mjml"
irb(main):003:0> Mjml.check_version(mjml_bin)
=> false Also checking things from bash -> ~ $ which mjml
/app/node_modules/.bin/mjml
~ $ mjml --version
mjml-core: 4.6.0
mjml-cli: 4.6.0
~ $ |
I followed the Heroku instructions by adding the node buildpack and package.json but I'm still seeing a message about an unfound binary.
My package.json reads:
{
"name": "appname",
"version": "1.0.0",
"dependencies": {
"mjml": "^4.0.0"
}
}
and there is no error thrown in the node build, but I still see:
"Couldn't find the MJML binary.. have you run $ npm install mjml? "
when initialising the rails app. I have yet to write any mjml so I don't know whether or not the pacakge is working, and I don't have a lot of experience with npm. Do you have an advice for me?
The text was updated successfully, but these errors were encountered: