[bug] no recent ruby gem builds available for x86_64
Product
BAML
Describe the bug
It appears that the latest ruby gem build for x86 macs is 0.54.0 ... :(
Reproduction Steps
❯ grep baml Gemfile
gem "baml", "0.90.2"
❯ bundle install
Fetching gem metadata from https://rubygems.org/.........
Could not find gems matching 'baml (= 0.90.2)' valid for all resolution platforms (aarch64-linux, aarch64-linux-gnu, aarch64-linux-musl, arm64-darwin, x86_64-darwin,
x86_64-darwin-22, x86_64-linux, x86_64-linux-gnu, x86_64-linux-musl) in rubygems repository https://rubygems.org/ or installed locally.
The source contains the following gems matching 'baml (= 0.90.2)':
* baml-0.90.2-aarch64-linux
* baml-0.90.2-aarch64-linux-musl
* baml-0.90.2-arm-linux
* baml-0.90.2-arm64-darwin
* baml-0.90.2-x86_64-linux
* baml-0.90.2-x86_64-linux-musl
BAML Version
0.90.2
Language/Framework
Ruby
LLM Provider
Mistral
LLM Model
No response
Operating System
macOS
Browser
Chrome
Code Editor
Cursor
Additional Data Point: arm64-darwin-24 (macOS 15 Sequoia) Platform Resolution Issue
I'm experiencing the same platform resolution problem on macOS 15 Sequoia (arm64-darwin-24):
Environment
- macOS Version: 15.7.1 (darwin24)
- Ruby Version: 3.4.4
- Bundler Version: 2.6.6
- Platform: arm64-darwin-24
- BAML Gem Version Attempted: 0.90.2
Error
$ bundle add baml
Could not find gems matching 'baml' valid for all resolution platforms
(arm64-darwin, aarch64-linux, ruby, arm64-darwin-24) in rubygems repository
https://rubygems.org/ or installed locally.
The source contains the following gems matching 'baml':
* baml-0.90.2-aarch64-linux
* baml-0.90.2-aarch64-linux-musl
* baml-0.90.2-arm-linux
* baml-0.90.2-arm64-darwin ← Exists, but Bundler won't use it
* baml-0.90.2-x86_64-linux
* baml-0.90.2-x86_64-linux-musl
Root Cause
The gem is published as baml-0.90.2-arm64-darwin (generic darwin), but:
- macOS 15 identifies as
arm64-darwin-24(darwin version 24) - Bundler tries to resolve for both
arm64-darwinANDarm64-darwin-24simultaneously - Since no
arm64-darwin-24variant exists, resolution fails - The
rubyplatform is also added to PLATFORMS, which doesn't have a baml gem variant
Workaround That Works
# 1. Manually edit Gemfile.lock to keep only arm64-darwin platform
sed -i '' '/PLATFORMS/,/^$/{/^ ruby$/d; /^ arm64-darwin-24$/d;}' Gemfile.lock
sed -i '' 's/^PLATFORMS$/PLATFORMS\n arm64-darwin/' Gemfile.lock
# 2. Add baml to Gemfile
echo 'gem "baml"' >> Gemfile
# 3. Install (now Bundler only resolves for arm64-darwin)
bundle install
Result: Successfully installed baml-0.90.2-arm64-darwin
Additional Observation
After successful installation, the gem produces constant redefinition warnings at runtime:
warning: already initialized constant Baml::StreamState
/vendor/bundle/ruby/3.4.0/gems/baml-0.90.2-arm64-darwin/lib/baml.rb:23
previous definition of StreamState was here
/vendor/bundle/ruby/3.4.0/gems/baml-0.90.2-arm64-darwin/lib/stream.rb:18
This suggests baml.rb and stream.rb both define the same constant.
Impact
This affects:
- macOS 15 (darwin-24) users on arm64 - Cannot install via standard
bundle add - x86_64 Mac users on versions > 0.54.0 - Cannot install at all (per original report)
- Multi-platform projects - Resolution fails when Gemfile.lock has multiple platforms
- CI/CD pipelines - May fail if using newer macOS runners
The official Ruby installation docs show bundle add baml sorbet-runtime which does not work for affected platforms.
Build Configuration Reference
.github/workflows/build-ruby-release.reusable.yaml currently builds:
arm64-darwin(generic, no version suffix)x86_64-darwin(last published: 0.54.0 per original report)- Various Linux platforms
No version-specific darwin builds (darwin-22, darwin-23, darwin-24) are created.
Oh jeez, sorry for the radio silence on this. We'll try to take a look at this when we can: unfortunately the Ruby build has been having a lot of issues and is way behind on releases right now.