Issue trying to build website locally: error from libv8 when trying to run bundle install
Problem
I am having an issue when I try to build the website locally.
When I run bundle install I see this message which I haven’t seen before:
The dependency wdm (~> 0.1.0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mswin32, x86-mingw32, x64-mingw32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mswin32 x86-mingw32 x64-mingw32`.
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mswin32, x86-mingw32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mswin32 x86-mingw32 x64-mingw32 java`.
Then I encounter an error:
An error occurred while installing libv8 (7.3.492.27.1), and Bundler cannot continue.
Make sure that `gem install libv8 -v '7.3.492.27.1' --source 'https://rubygems.org/'` succeeds before bundling.
Running gem install libv8 -v '7.3.492.27.1' --source 'https://rubygems.org/' seems to work successfully but then when I run bundle install again it throws the same error.
I think the issue is related to the ruby version we use for the site not being supported by libv8. When I check my ruby version it returns ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin20]
but [x86_64-darwin20] is not listed a supported platform in the libv8 README.
@cwoolley-gitlab pointed out that this looks to be related to using Big Sur.
There seems to be a solution that some folks on Big Sur have been able to use but it didn’t work for me: https://gist.github.com/fernandoaleman/868b64cd60ab2d51ab24e7bf384da1ca#gistcomment-3680535