You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While verifying the macOS ARM64 (ruby-3.2.2-darwin-arm64.tar.gz) and Intel (ruby-3.2.2-darwin.tar.gz) portable Conan Ruby packages in s3://openstudio-resources/pat-dependencies3/ for NatLabRockies/OpenStudio-PAT#311, we identified two upstream packaging issues in the Conan Ruby 3.2.2 build/archive:
1. Custom lib/ruby/3.2.0/rubygems.rb modification pre-activates securerandom 0.2.2 before Bundler runs
In the Conan Ruby 3.2.2 build (ruby/3.2.2#e349279c358fd8f54d83446a3af8ecfe), lib/ruby/3.2.0/rubygems.rb replaces upstream Ruby's autoload declarations with eager require calls at the bottom of rubygems.rb (lines 1397–1406) beforeGem::Specification.load_defaults runs:
Because rubygems/spec_fetcher requires rubygems/remote_fetcher -> resolv -> securerandom, and Gem::Specification.load_defaults has not yet registered the default gems, Ruby loads securerandom from stdlib and then registers securerandom-0.2.2 as an already-activated default gem specification once load_defaults executes.
When OpenStudio-server subsequently runs Bundler.setup with a Gemfile.lock that locks securerandom (0.4.1), Bundler raises:
Gem::LoadError: You have already activated securerandom 0.2.2, but your Gemfile requires securerandom 0.4.1. Prepending `bundle exec` to your command may solve this.
Fix: Either restore upstream Ruby 3.2.2's autoload :SpecFetcher, "rubygems/spec_fetcher" in lib/ruby/3.2.0/rubygems.rb, or ensure Gem::Specification.load_defaults runs before any eager require of rubygems/spec_fetcher.
2. macOS ._* AppleDouble resource fork files in ruby-3.2.2-darwin-arm64.tar.gz
ruby-3.2.2-darwin-arm64.tar.gz in s3://openstudio-resources/pat-dependencies3/ was archived on macOS without COPYFILE_DISABLE=1, leaving ._* AppleDouble files throughout ruby/. Fix: Repackage ruby-3.2.2-darwin-arm64.tar.gz (and any macOS dependency tarballs) with COPYFILE_DISABLE=1 tar -czf ....
Activity