-
Notifications
You must be signed in to change notification settings - Fork 90
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
BUG?: Bump mini_racer from 0.4.0 to 0.5.0 getting compile errors #220
Comments
You're |
Also got this. But maybe I have something to add: it only happens on Ruby 2.7 and 2.6, not on 3.0. |
To avoid this: rubyjs/mini_racer#220
To avoid this: rubyjs/mini_racer#220
@tsugimoto I saw #218 but since it's a different error, I wasn't confident it was the same issue, even if the result is the same. Thanks for cross-linking though |
Definitely looks like the same root cause, you can see things being mixed up here:
With each Ruby version the vendored rubygems+bundler get updated. Can you update your rubygems+bundler and see if the issue persists? |
Thank you @lloeki. We were locking an outdated bundler version in our GitHub Actions due to an earlier issue with libv8. See: opal/opal#2360 |
I got this error too. Steps to reproduce: > docker run -ti -w /usr/src/app --entrypoint /bin/sh ruby:2.7.4-alpine
> apk update && apk add --no-cache build-base
> gem update --system; gem install bundler
> bundle init
> echo "gem 'mini_racer', '0.5.0'" >> Gemfile
> bundle => but it has to be
> docker run -ti -w /usr/src/app --entrypoint /bin/sh ruby:2.7.4-alpine
> apk update && apk add --no-cache build-base
> gem update --system; gem install bundler
> bundle init
> echo "gem 'mini_racer', '0.4.0'" >> Gemfile
> bundle Edit: for |
I'm going to try creating a fat gem which includes both linux and linux-musl libs (which I don't quite like since it doubles the gem size, but even when I get to fix the root rubygems/bundler issue old versions of these would still be affected) |
Is there a fix for this? This is still happening with v0.6.0 as well. |
I think this may actually be a bug with the
I'm on Arch, which I don't think uses musl, and I haven't noticed |
Sorry, I should have read more of the context: rubyjs/libv8-node#5, rubygems/rubygems#3174. The bug lies in rubygems. A fix was merged (rubygems/rubygems#4082), with a second rubygems PR outstanding (rubygems/rubygems#4488). Despite that second PR not being merged/released yet, simply updating rubygems allows me to successfully install the gem now: 🎉
Edit: Bundler still uses the wrong version - hence the second PR |
@lloeki thanks so much for all the work you've done here. Like I asked on the other repo, is there anything I can do to help fix this? It's not fair to put all this on you but I'm not sure on what needs to be done or how I can help. |
@bf4 can you check again against the latest mini_racer version? Also make sure to update rubygems and bundler. A lot of related issues were solved by updating Rubygems and bundler and making sure the the right platforms are added to |
Correct, but also, make sure to remove any platform-mismatched gem that may have been erroneously installed previously, otherwise bundler may be lazy and pick those up instead of hitting rubygems.org again. In some cases bundler was being stubborn and I've had to install the gem first with
It would indeed, but it should also helps in some corner cases e.g: a) one created the lockfile on another platform than linux and did not run |
We have a dependabot/terraform PR problem: all the dependabot-triggered builds fail. A propos of rubyjs/mini_racer#220 (comment) ...update the rubygems and bundler that Docker (and hence CI) uses. Try this on its own first, then try `bundle lock --add-platform x86_64-linux`
It was surprisingly complicated to get an unpinned mini_racer. Mini_racer requires compilation, and this was failing on version 0.5.0 or higher. rubyjs/mini_racer#220 appears relevant, and gives hints about updating bundler and rubygems (we also updated the hard-coded rake in the Dockerfile for good measure). After recreating the Gemfile.lock from scratch (because bundler will automatically install and run the version of bundler from the Gemfile.lock file) it still didn't work, but told us to run `bundle lock --add-platform x86_64-linux` which made it successfully work. This is probably of use to other projects struggling to upgrade mini_racer.
It was surprisingly complicated to get an unpinned mini_racer. Mini_racer requires compilation, and this was failing on version 0.5.0 or higher. rubyjs/mini_racer#220 appears relevant, and gives hints about updating bundler and rubygems (we also updated the hard-coded rake in the Dockerfile for good measure). After recreating the Gemfile.lock from scratch (because bundler will automatically install and run the version of bundler from the Gemfile.lock file) it still didn't work, but told us to run `bundle lock --add-platform x86_64-linux` which made it successfully work. This is probably of use to other projects struggling to upgrade mini_racer.
It was surprisingly complicated to get an unpinned mini_racer. Mini_racer requires compilation, and this was failing on version 0.5.0 or higher. rubyjs/mini_racer#220 appears relevant, and gives hints about updating bundler and rubygems (we also updated the hard-coded rake in the Dockerfile for good measure). After recreating the Gemfile.lock from scratch (because bundler will automatically install and run the version of bundler from the Gemfile.lock file) it still didn't work, but told us to run `bundle lock --add-platform x86_64-linux` which made it successfully work. This is probably of use to other projects struggling to upgrade mini_racer.
This isn't a bug in mini racer or in Heroku. This is a bug in bundler. Make sure you run:
Then add the results to git before you try to deploy again. Previously bundler would raise an error if you tried deploying to a linux target without the linux platform locked. It looks like there's been a regression and that error is no longer raised. If that error still existed it would prevent this problem from happening as it wouldn't even let you try to |
I've added a PR to add an installation troubleshooting section to the README: #240. |
Thank you. It works. |
Workaround. Resolved by upgrading from ruby 2.7 to ruby 3.0 |
I see them in the GitHub Actions as well. Not sure exactly what caused it, but didn't see an existing issue so reporting
e.g. https://github.com/rubyjs/mini_racer/runs/4174922268?check_suite_focus=true
building against Ruby 2.7.2, heroku buildpack running on the heroku/heroku:18-build image and node 10.15.3
stacktrace from circleci
seems to be specific to libv8-node-15.14.0.0 -> libv8-node-16.10.0.0 requires I install node 16.13.0? (nope, that didn't work)
The text was updated successfully, but these errors were encountered: