Fastlane failed to run pod install

I didn’t change any circle.yml or fastfile recently, but this morning I got this error. Anybody know what’s going wrong here?

[01:39:29]: $ bundle exec pod install
[01:39:29]: ▸ /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.12.1/lib/bundler/rubygems_integration.rb:373:in `block in replace_bin_path': can't find executable bundle (Gem::Exception)
[01:39:29]: ▸ from /usr/local/lib/ruby/site_ruby/2.0.0/rubygems.rb:278:in `activate_bin_path'
[01:39:29]: ▸ from /usr/local/lib/ruby/gems/2.0.0/bin/bundle:22:in `<main>'
[01:39:29]: Variable Dump:
[01:39:29]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>:ios, :LANE_NAME=>"ios production"}
[01:39:29]: Exit status of command 'bundle exec pod install' was 1 instead of 0.
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.12.1/lib/bundler/rubygems_integration.rb:373:in `block in replace_bin_path': can't find executable bundle (Gem::Exception)
	from /usr/local/lib/ruby/site_ruby/2.0.0/rubygems.rb:278:in `activate_bin_path'
	from /usr/local/lib/ruby/gems/2.0.0/bin/bundle:22:in `<main>'

Hi Sarun,

This looks like an issue with Rubygems that I’ve seen on the Ubuntu containers. It’s a bug with recent versions of Rubygems and certain combinations of Rubygems and Bundler. I’ll bring this to the attention of our OS X team. As a workaround, can you try seeing if this fixes the error?

sudo gem update --system 2.4.8
gem uninstall bundler
gem install bundler
1 Like

Hi Sarun,
A follow-up question: could you please installing a newer version of rubygems in your build? Something like this should do it:

dependencies:
  pre:
    - gem update --system

We are very sorry for the trouble, and we hope to fix this soon. We would really appreciate your help debugging this.

1 Like

Unfortunately seeing the same error, with the workarounds

I do have the same kind of problem:

[08:10:20]: $ make sort-project
[08:10:20]: ▸ bundle exec synx -p -e "Vendor" project.xcodeproj
[08:10:20]: ▸ /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.12.3/lib/bundler/rubygems_integration.rb:373:in `block in replace_bin_path': can't find executable bundle (Gem::Exception)
[08:10:20]: ▸ from /usr/local/lib/ruby/site_ruby/2.0.0/rubygems.rb:278:in `activate_bin_path'
[08:10:20]: ▸ from /usr/local/lib/ruby/gems/2.0.0/bin/bundle:22:in `<main>'
[08:10:20]: ▸ make: *** [sort-project] Error 1

My circle.yml already contained:

dependencies:
  pre:
    - sudo gem update --system
    - sudo gem install bundler

My last successful build was on May 6. The next build on May 10 failed. Successful builds do not build anymore.

Edit: Using RubyGems 2.4.8 as suggested by Eric does not work better.

I “successfully” turned my build back to green.

I now use RubyGems 2.6.1 and Bundler 1.12.1.

Don’t ask me why those two specific versions. I don’t know.

Hi, Sarun.

I encountered the same problem with fastlane, like

bundle exec fastlane myCustomAction
-> bundle exec pod install
-> same error occured!!

and I wrote as follows in fastlane/Fastfile,

  cocoapods(use_bundle_exec: false)

It seems that calling bundle exec pod install during fastlane action causes error.

I hope my answer help you.

3 Likes

I also just got this with fastlane. The answer provided helped.

this answer helps me a lot! thanks!

1 Like