Closed diaclavijo closed 1 year ago
Looks like you're on Ruby 2.6.0 which is EOL since 2022-04-12. mini_racer only supports non-EOL'd Rubies (see here). You might be able to install earlier versions of mini_racer.
That being said, can you run the following script via docker run -it --rm -v "$(pwd)":/app -w /app ruby:2.6.10 ruby /app/minimal.rb
?
require "bundler/inline"
gemfile do
source "https://rubygems.org"
gem "mini_racer"
end
require "libv8-node"
puts "RUBY_VERSION : #{RUBY_VERSION}"
puts "RUBY_PLATFORM: #{RUBY_PLATFORM}"
puts "MiniRacer::VERSION: #{MiniRacer::VERSION}"
puts "MiniRacer::LIBV8_NODE_VERSION: #{MiniRacer::LIBV8_NODE_VERSION}"
puts "Libv8::Node::VERSION: #{Libv8::Node::VERSION}"
puts "Libv8::Node::NODE_VERSION: #{Libv8::Node::NODE_VERSION}"
puts "Libv8::Node::LIBV8_VERSION: #{Libv8::Node::LIBV8_VERSION}"
ctx = MiniRacer::Context.new
puts ctx.eval("1+1")
On my M1 MacBook Pro (on MacOS 13.1) it works fine even on Ruby 2.6.10:
$ docker run -it --rm -v "$(pwd)":/app ruby:2.6.10 ruby /app/minimal.rb
RUBY_VERSION : 2.6.10
RUBY_PLATFORM: aarch64-linux
MiniRacer::VERSION: 0.6.3
MiniRacer::LIBV8_NODE_VERSION: ~> 16.10.0.0
Libv8::Node::VERSION: 16.10.0.0
Libv8::Node::NODE_VERSION: 16.10.0
Libv8::Node::LIBV8_VERSION: 9.3.345.19
2
No, i'm on ruby 3.0.
I had to do force this to have the platform aarch64-linux in my Gemfile os it will pick up the right binaries, as I understand it.
I run bundle lock --add-platform aarch64-linux
I believe the issue is related to bundler.
@diaclavijo hi, I'm working with m1, but i meet the issue like this
An error occurred while installing mini_racer (0.6.3), and Bundler
cannot continue.
can you tell me how you solved it? Thanks.
Hey @Code-kunkun. Without any further information on your setup/environment, logs, … it's impossible to help. Please check https://github.com/rubyjs/mini_racer/#troubleshooting. @diaclavijo's missing platform in Gemfile.lock
is also described there.
Hello,
I'm working with Docker on M1 Macbook Pro, then when I am trying to update the project from mini_racer 0.4 to 0.6 to support ruby 3.1 it is failing while doing
bundle install
. See return at bottom.The problem seems related to
libv8-node (16.10.0.0)
.On another hand, it works fine while installing it locally (not docker).