Xcode 26.2 stable stack and cocoapods

I am using Xcode 26.2 stable stack to build my project
And I have the following tools in my bitrise.yaml file

tools:
  ruby: 3.3:installed

And I have a script step in the beginning of my workflow to add a private podspec repository, that looks like this:

git config --global user.name ‘myUseName’
git config --global user.email myEmail@mydomain.com
pod repo add my-private-specs git@gitprovider.com:my-project/my-private-specs.git

My workflow has been working till now, the last time I launched it was on 26 January, with no problems

Today, when I launch it I had the following error
pod repo add my-private-specs ``git@gitprovider.com``:my-project/my-private-specs.git
/Users/vagrant/.asdf/installs/ruby/3.4.5/lib/ruby/3.4.0/rubygems.rb:269:in ‘Gem.find_spec_for_exe’: can’t find gem cocoapods (>= 0.a) with executable pod (Gem::GemNotFoundException)
from /Users/vagrant/.asdf/installs/ruby/3.4.5/lib/ruby/3.4.0/rubygems.rb:288:in ‘Gem.activate_bin_path’
from /Users/vagrant/.asdf/installs/ruby/3.4/bin/pod:25:in ‘’

I tried to change tools by adding cocoapods, but I have another errors:
pod repo add my-private-specs ``git@gitprovider.com``` :my-project/my-private-specs.git/nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/source/git.rb:236:in rescue in load_spec_files’: GitHub - CocoaPods/inch_by_inch: A rake task to pretty-print documentation violations. (at loosen-dependency@484fd1f) is not yet checked out. Run bundle install first. (Bundler::GitError)
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/source/git.rb:232:in load_spec_files' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/source/path.rb:97:in local_specs’
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/source/git.rb:200:in specs' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/source.rb:60:in spec_names’
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/source_map.rb:21:in block in all_requirements' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/source_map.rb:20:in map’
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/source_map.rb:20:in all_requirements' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/definition.rb:968:in find_source_requirements’
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/definition.rb:960:in source_requirements' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/definition.rb:570:in resolution_packages’
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/definition.rb:552:in resolver' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/definition.rb:633:in start_resolution’
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/definition.rb:306:in resolve' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/definition.rb:582:in materialize’
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/definition.rb:193:in specs' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/definition.rb:260:in specs_for’
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/runtime.rb:18:in setup' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler.rb:164:in setup’
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/setup.rb:32:in block in <top (required)>' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/ui/shell.rb:173:in with_level’
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/ui/shell.rb:119:in silence' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/setup.rb:32:in <top (required)>’
from internal:/nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb:139:in require' from <internal:/nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:139:in require’
from /Users/vagrant/.local/share/mise/installs/cocoapods/1.16.2/bin/pod:27:in <main>' /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/source/path.rb:199:in load_spec_files’: The path /Users/vagrant/.local/share/mise/installs/cocoapods/1.16.2/vendor/bundle/ruby/3.3.0/bundler/gems/inch_by_inch-484fd1ff09c2 does not exist. (Bundler::PathError)
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/source/git.rb:233:in load_spec_files' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/source/path.rb:97:in local_specs’
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/source/git.rb:200:in specs' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/source.rb:60:in spec_names’
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/source_map.rb:21:in block in all_requirements' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/source_map.rb:20:in map’
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/source_map.rb:20:in all_requirements' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/definition.rb:968:in find_source_requirements’
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/definition.rb:960:in source_requirements' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/definition.rb:570:in resolution_packages’
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/definition.rb:552:in resolver' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/definition.rb:633:in start_resolution’
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/definition.rb:306:in resolve' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/definition.rb:582:in materialize’
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/definition.rb:193:in specs' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/definition.rb:260:in specs_for’
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/runtime.rb:18:in setup' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler.rb:164:in setup’
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/setup.rb:32:in block in <top (required)>' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/ui/shell.rb:173:in with_level’
from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/ui/shell.rb:119:in silence' from /nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/bundler/setup.rb:32:in <top (required)>’
from internal:/nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb:139:in require' from <internal:/nix/store/d9wal8y7w1zpvyas3x1q4ykz880mmklk-ruby-3.3.10/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:139:in require’
from /Users/vagrant/.local/share/mise/installs/cocoapods/1.16.2/bin/pod:27:in `’ ``

I see there is an update in the changelog of the stack right now:

Stack update v2026-02-03 (released 2026-02-04)

  • The Ruby 3.3.9 version that is pre-built on the stack is now built with --enable-shared. It was previously built with --disable-shared. The --disable-shared option was required for compatibility with a past version of Xcode, but it is no longer necessary. Using --enable-shared allows Ruby gems with native extensions that depend on the shared Ruby library to work properly. We plan to use --enable-shared for all Ruby versions on this stack in a future update.

My question is: how to fix my issue ?
How can I force using a ruby version with --disable-shared again (to test if it fixes my issue) ?

I also tried with

tools:
  ruby: 3.4:installed
  cocoapods: 1.16:installed

with the following errors

+ pod repo add my-private-specs git@gitprovider.com:my-project/my-private-specs.git
/Users/vagrant/.local/share/mise/installs/cocoapods/1.16.2/vendor/bundle/ruby/3.4.0/gems/bundler-2.3.26/lib/bundler/definition.rb:507:in 'Bundler::Definition#materialize': Could not find bigdecimal-3.1.8, bigdecimal-3.1.8, bigdecimal-3.1.8, bigdecimal-3.1.8, bigdecimal-3.1.8, bigdecimal-3.1.8, bigdecimal-3.1.8, bigdecimal-3.1.8, ruby-prof-1.7.1, ruby-prof-1.7.1, ruby-prof-1.7.1, ruby-prof-1.7.1, ruby-prof-1.7.1, ruby-prof-1.7.1, ruby-prof-1.7.1, ruby-prof-1.7.1, rainbow-2.2.2, rainbow-2.2.2, rainbow-2.2.2, rainbow-2.2.2, rainbow-2.2.2, rainbow-2.2.2, rainbow-2.2.2, rainbow-2.2.2, json-2.7.5, json-2.7.5, json-2.7.5, json-2.7.5, json-2.7.5, json-2.7.5, json-2.7.5, json-2.7.5, nkf-0.2.0, nkf-0.2.0, nkf-0.2.0, nkf-0.2.0, nkf-0.2.0, nkf-0.2.0, nkf-0.2.0, nkf-0.2.0 in locally installed gems (Bundler::GemNotFound)
	from /Users/vagrant/.local/share/mise/installs/cocoapods/1.16.2/vendor/bundle/ruby/3.4.0/gems/bundler-2.3.26/lib/bundler/definition.rb:187:in 'Bundler::Definition#specs'
	from /Users/vagrant/.local/share/mise/installs/cocoapods/1.16.2/vendor/bundle/ruby/3.4.0/gems/bundler-2.3.26/lib/bundler/definition.rb:244:in 'Bundler::Definition#specs_for'
	from /Users/vagrant/.local/share/mise/installs/cocoapods/1.16.2/vendor/bundle/ruby/3.4.0/gems/bundler-2.3.26/lib/bundler/runtime.rb:18:in 'Bundler::Runtime#setup'
	from /Users/vagrant/.local/share/mise/installs/cocoapods/1.16.2/vendor/bundle/ruby/3.4.0/gems/bundler-2.3.26/lib/bundler.rb:161:in 'Bundler.setup'
	from /Users/vagrant/.local/share/mise/installs/cocoapods/1.16.2/vendor/bundle/ruby/3.4.0/gems/bundler-2.3.26/lib/bundler/setup.rb:20:in 'block in <top (required)>'
	from /Users/vagrant/.local/share/mise/installs/cocoapods/1.16.2/vendor/bundle/ruby/3.4.0/gems/bundler-2.3.26/lib/bundler/ui/shell.rb:136:in 'Bundler::UI::Shell#with_level'
	from /Users/vagrant/.local/share/mise/installs/cocoapods/1.16.2/vendor/bundle/ruby/3.4.0/gems/bundler-2.3.26/lib/bundler/ui/shell.rb:88:in 'Bundler::UI::Shell#silence'
	from /Users/vagrant/.local/share/mise/installs/cocoapods/1.16.2/vendor/bundle/ruby/3.4.0/gems/bundler-2.3.26/lib/bundler/setup.rb:20:in '<top (required)>'
	from <internal:/nix/store/q68n46bxws0568w63lfibkfdy8gkpp4b-ruby-3.4.8/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:139:in 'Kernel#require'
	from <internal:/nix/store/q68n46bxws0568w63lfibkfdy8gkpp4b-ruby-3.4.8/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:139:in 'Kernel#require'
	from /Users/vagrant/.local/share/mise/installs/cocoapods/1.16.2/bin/pod:27:in '<main>'

You can try by using the previous version of the Stack: Stack update policy

thanks for your response.
The checkbox to select “Use previous stack version“ is disabled

I tried adding “stack_rollback_version: 2-125-1“ in the yaml configuration. But it seems to have no effect

edit: in fact, the stack image version is 2-125-1 before and after the stack update ..

I also tried with Xcode 26.2 with edge updates stack, and I have exactly the same errors

We only changed Ruby 3.3.9 in this release, Ruby 3.4.0 tried in the second post was unchanged.
Do you cache gems? Clearing cache could help.

I have not modified my iOS workflows during last weeks
before the stack update, cocoapods was installed by default

I do not have a Gemfile, and I did not cache gems. Bitrise chatbot suggested me multiple commands to add before my script, but all failed:

# Clear bundler configuration that points to old paths
rm -rf ~/.bundle
bundle config --delete path
bundle config --delete deployment

# Ensure Ruby environment is properly loaded
source ~/.asdf/asdf.sh
asdf reshim ruby

bundle config --delete path

bundle install

I submitted a support ticket #74390283

We were able to resolve the issue over an Intercom ticket

This was my analysis of the issue and the OP confirmed this solved the issue:

”I think the issue is caused by the stack’s new Ruby/mise/CocoaPods setup changing how pod is installed and executed, so your old “naked” pod command is now running through a different Ruby and a partially‑installed Bundler environment.
​
In looking at your post in the discuss community page, the first error (can't find gem cocoapods (>= 0.a) with executable pod) shows that pod is being run via Ruby 3.4.5 where the cocoapods gem is not installed
​
I think the fix is to stop using your own ad‑hoc CocoaPods installation in the Script step, and instead either rely on the preinstalled CocoaPods or a Bundler‑controlled version that you drive explicitly.
​
If you want minimal changes and to keep the defined ruby 3.3 version you can keep that but remove cocoapods from there and you can install CocoaPods yourself in that Script and then use it:
​
​set -e

git config --global user.name "myUseName"

git config --global user.email "myEmail@mydomain.com"

# install cocoapods gem in the Ruby you requested

gem install cocoapods -v 1.16.2 --no-document

pod repo add my-private-specs git@gitprovider.com:my-project/my-private-specs.git

You can also let the Bitrise Cocoapod install do the installation for you but you would have to add Gemfile/Gemfile.lock with your desired CocoaPods version → Bitrise will run bundle exec pod install in the CocoaPods step”

Customer confirmed that using gem install cocoapods -v 1.16.2 --no-document resolved the issue