Skip to content

Running gem build --platform aarch64-linux on aarch64 Linux creates a non platform-specific gem #9344

@ankane

Description

@ankane

Describe the problem as clearly as you can

When building a gem with --platform aarch64-linux on aarch64 Linux, RubyGems create a non platform-specific gem (hello-0.1.0.gem) instead of a platform-specific one (hello-0.1.0-aarch64-linux.gem).

Did you try upgrading RubyGems?

Yes

Post steps to reproduce the problem

  1. Create a new gem with bundle gem hello
  2. Update the gemspec to fix errors and warnings
  3. Run gem build --platform aarch64-linux

Which command did you run?

gem build --platform aarch64-linux

What were you expecting to happen?

It builds hello-0.1.0-aarch64-linux.gem

What actually happened?

It builds hello-0.1.0.gem

  Successfully built RubyGem
  Name: hello
  Version: 0.1.0
  File: hello-0.1.0.gem

Run gem env and paste the output below

RubyGems Environment:
  - RUBYGEMS VERSION: 4.0.6
  - RUBY VERSION: 4.0.1 (2026-01-13 patchlevel 0) [aarch64-linux]
  - INSTALLATION DIRECTORY: /home/user/.rbenv/versions/4.0.1/lib/ruby/gems/4.0.0
  - USER INSTALLATION DIRECTORY: /home/user/.local/share/gem/ruby/4.0.0
  - CREDENTIALS FILE: /home/user/.local/share/gem/credentials
  - RUBY EXECUTABLE: /home/user/.rbenv/versions/4.0.1/bin/ruby
  - GIT EXECUTABLE: /usr/bin/git
  - EXECUTABLE DIRECTORY: /home/user/.rbenv/versions/4.0.1/bin
  - SPEC CACHE DIRECTORY: /home/user/.cache/gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /home/user/.rbenv/versions/4.0.1/etc
  - RUBYGEMS PLATFORMS:
     - ruby
     - aarch64-linux
  - GEM PATHS:
     - /home/user/.rbenv/versions/4.0.1/lib/ruby/gems/4.0.0
     - /home/user/.local/share/gem/ruby/4.0.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => true
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /home/user/.rbenv/versions/4.0.1/bin
     - /home/linuxbrew/.linuxbrew/Cellar/rbenv/1.3.2/libexec
     - /home/user/.cargo/bin
     - /home/user/.rbenv/shims
     - /home/linuxbrew/.linuxbrew/bin
     - /home/linuxbrew/.linuxbrew/sbin
     - /usr/local/sbin
     - /usr/local/bin
     - /usr/sbin
     - /usr/bin
     - /sbin
     - /bin

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions