Skip to content

Commit 9de836d

Browse files
committed
precompiled: set required_rubygems_version in native gems
Note that we only do this if the platform OS is "linux". Versions of rubygems before 3.3.22 do not recognize the `-gnu` or `-musl` suffix on linux platforms. The failure when installing the gem is > ERROR: While executing gem ... (Gem::Exception) > Unable to find spec for #<Gem::NameTuple rcee_precompiled, 0.6.test.2024.0128.1724, aarch64-linux> This PR changes the error message to: > ERROR: Error installing rcee_precompiled-0.6.test.2024.0128.1735-x86_64-linux-musl.gem: > rcee_precompiled-0.6.test.2024.0128.1735-x86_64-linux-musl requires RubyGems version >= 3.3.22. > The current RubyGems version is 3.2.33. Try 'gem update --system' to update RubyGems itself.
1 parent d8ea869 commit 9de836d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

precompiled/Rakefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ Rake::ExtensionTask.new("precompiled", rcee_precompiled_spec) do |ext|
4242
# remove things not needed for precompiled gems
4343
spec.dependencies.reject! { |dep| dep.name == "mini_portile2" }
4444
spec.files.reject! { |file| File.fnmatch?("*.tar.gz", file) }
45+
46+
if spec.platform.os == "linux"
47+
# the `-gnu` suffix is not recognized in earlier versions of rubygems
48+
spec.required_rubygems_version.concat([">= 3.3.22"])
49+
end
4550
end
4651
end
4752

0 commit comments

Comments
 (0)