From edf83291ca727acba1d88ea2e9b7614b5b083401 Mon Sep 17 00:00:00 2001 From: Tom de Bruijn Date: Tue, 3 Dec 2024 09:20:41 +0100 Subject: [PATCH] Fix JRuby jar-dependencies gem install issue Try and fix error that occurs on the ci: > Gem::LoadError: You have already activated jar-dependencies 0.4.1, but > your Gemfile requires jar-dependencies 0.5.0. Since jar-dependencies > is a default gem, you can either remove your dependency on it or try > updating to a newer version of bundler that supports jar-dependencies > as a default gem. --- gemfiles/rails-7.1.gemfile | 10 +++++++--- gemfiles/rails-7.2.gemfile | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/gemfiles/rails-7.1.gemfile b/gemfiles/rails-7.1.gemfile index 1e89d50c0..bb893ccd1 100644 --- a/gemfiles/rails-7.1.gemfile +++ b/gemfiles/rails-7.1.gemfile @@ -4,8 +4,12 @@ gem "rails", "~> 7.1.0" gem "rake", "> 12.2" gem "sidekiq" -# Fix install issue for jruby on gem 3.1.8. -# No java stub is published. -gem "bigdecimal", "3.1.7" if RUBY_PLATFORM == "java" +if RUBY_PLATFORM == "java" + # Fix install issue for jruby on gem 3.1.8. + # No java stub is published. + gem "bigdecimal", "3.1.7" + # Fix default gem install issue + gem "jar-dependencies", "0.5.0" +end gemspec :path => "../" diff --git a/gemfiles/rails-7.2.gemfile b/gemfiles/rails-7.2.gemfile index ec5f9f3c9..0f9454632 100644 --- a/gemfiles/rails-7.2.gemfile +++ b/gemfiles/rails-7.2.gemfile @@ -4,8 +4,12 @@ gem "rails", "~> 7.2.0" gem "rake", "> 12.2" gem "sidekiq" -# Fix install issue for jruby on gem 3.1.8. -# No java stub is published. -gem "bigdecimal", "3.1.7" if RUBY_PLATFORM == "java" +if RUBY_PLATFORM == "java" + # Fix install issue for jruby on gem 3.1.8. + # No java stub is published. + gem "bigdecimal", "3.1.7" + # Fix default gem install issue + gem "jar-dependencies", "0.5.0" +end gemspec :path => "../"