Install bundler versions depending on Ruby version (#41962)

Summary:
Since yesterday evening (why it is always friday evening???) CircleCI or Gem decided to update the default bundler version that is installed with `gem bundle install`.
Therefore, CI for iOS stopped working.

This change installs bundler's versions so that they are compatible with the Ruby version.

## Changelog:

[Internal] - Fix CI for iOS installing versions of bundler that are compatible with Ruby

Pull Request resolved: https://github.com/facebook/react-native/pull/41962

Test Plan: CircleCI is green

Reviewed By: GijsWeterings

Differential Revision: D52230544

Pulled By: cipolleschi

fbshipit-source-id: 2f96e16ecb94159953056e8de757ea4d249f80f0
This commit is contained in:
Riccardo Cipolleschi
2023-12-16 08:50:20 -08:00
committed by Facebook GitHub Bot
parent b221265f41
commit 479b4bb1ba
+5 -1
View File
@@ -57,7 +57,11 @@ commands:
# Set ruby dependencies
rbenv global << parameters.ruby_version >>
gem install bundler
if [[ << parameters.ruby_version >> == "2.6.10" ]]; then
gem install bundler -v 2.4.22
else
gem install bundler
fi
bundle check || bundle install --path vendor/bundle --clean
- save_cache:
key: *rbenv_cache_key