- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.8k
Open
Labels
Description
Describe the problem as clearly as you can
When you generate Gemfile.lock from scratch with nokogiri in it, bundler adds four linux architectures and two darwin architectures.
PLATFORMS
  aarch64-linux
  arm-linux
  arm64-darwin
  x86-linux
  x86_64-darwin
  x86_64-linux
If you already have Gemfile.lock with one of the architectures it does not add any new architectures.
If you generate Gemfile.lock from an almost empty Gemfile, you get something like
PLATFORMS
  ruby
  x86_64-linux
There are two differences.
ruby is inserted in the last example.
And too many architectures are inserted in the first one.
Did you try upgrading rubygems & bundler?
rubygems 3.5.11
bundler 2.5.11
Post steps to reproduce the problem
docker run --rm -it ruby:3.3.1 bash
gem update --system
bundle init
bundle add nokogiri
cat Gemfile.lock
#PLATFORMS
#  aarch64-linux
#  arm-linux
#  arm64-darwin
#  x86-linux
#  x86_64-darwin
#  x86_64-linux
docker run --rm -it ruby:3.3.1 bash
gem update --system
bundle init
bundle # Creates Gemfile.lock with PLATFORMS [ruby, x86_64-linux]
bundle add nokogiri
cat Gemfile.lock
#PLATFORMS
#  ruby
#  x86_64-linux
Which command did you run?
What were you expecting to happen?
I expect the two lock files to be identical.
What actually happened?
There are two differences.
ruby is inserted in the last example.
And too many architectures are inserted in the first one.
If not included with the output of your command, run bundle env and paste the output below
CvXjpriollaud