We were using fastlane to run the CI work. Had to use AdService framework, and for that had to update Xcode. In order to do that, had to update macOS to Big Sur. After updating everything, gitlab CI stopped working:
$ bundle exec fastlane build
bundler: failed to load command: fastlane (/usr/local/bin/fastlane)
Bundler::GemNotFound: Could not find rake-13.0.3 in any of the sources
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-1.17.2/lib/bundler/spec_set.rb:91:in `block in materialize'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-1.17.2/lib/bundler/spec_set.rb:85:in `map!'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-1.17.2/lib/bundler/spec_set.rb:85:in `materialize'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-1.17.2/lib/bundler/definition.rb:170:in `specs'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-1.17.2/lib/bundler/definition.rb:237:in `specs_for'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-1.17.2/lib/bundler/definition.rb:226:in `requested_specs'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-1.17.2/lib/bundler/runtime.rb:108:in `block in definition_method'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-1.17.2/lib/bundler/runtime.rb:20:in `setup'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-1.17.2/lib/bundler.rb:107:in `setup'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-1.17.2/lib/bundler/setup.rb:20:in `<top (required)>'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
/Users/ci/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
So what I already tried: in .bash_profile added:
export PATH="$HOME/.fastlane/bin:$PATH"
It did not helped. Tried :
sudo gem install fastlane -NV
That did not help either.
Also tried:
fastlane update_fastlane
And:
bundle install --path vendor/cache
Was trying to google for the solution, but unluckly can't fix that. I am an iOS dev, so this is something new to me.
Any ideas how this could be fixed?
Okey, so for the ones who are looking for a solution, after 2 days I finally found an issue. Was digging a lot, changing, installing, reinstalling etc. I thought of trying everything.
In my case, I use bash shell, so configured .bash_profile, added these lines of code:
export PATH="$HOME/.fastlane/bin:$PATH"
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
in .bashrcthere was some paths, that I commented out, and now there is only 1 line of code:
eval "$(rbenv init -)"
After doing that all works
P.S. if you are using zsh then files are different. Not 100% sure, but check .profile, .zshrc
Also I have edited gemfile.lock, as some gems were not as required, but not even sure if that was needed, as now I am not going to touch CI as it works :D
Hope that will save some time for someone in future. Else, if someone wants to add something, you are more then welcome (with some explanation would be even better, as not many of developers probably knows how all this crazy stuff works :) )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With