From e1ffe7d9ca57701d140c13b526b168bc69f612f2 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 30 Aug 2024 15:07:40 +0100 Subject: [PATCH] Workaround libv8-node issue on Ubuntu 24.04 https://github.com/rubyjs/libv8-node/pull/52 --- cookbooks/web/resources/rails_port.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cookbooks/web/resources/rails_port.rb b/cookbooks/web/resources/rails_port.rb index debc4db50..2c33b2e71 100644 --- a/cookbooks/web/resources/rails_port.rb +++ b/cookbooks/web/resources/rails_port.rb @@ -408,6 +408,17 @@ action :delete end + if platform?("ubuntu") && node[:lsb][:release] == "24.04" + gem_package "libv8-node" do + version "= 18.19.0.0" + gem_binary node[:ruby][:gem] + end + + link "/var/lib/gems/3.2.0/gems/libv8-node-18.19.0.0-x86_64-linux/vendor/v8/x86_64-linux-gnu" do + to "x86_64-linux" + end + end + bundle_install "#{rails_directory}" do action :nothing user "root"