wordpress-mobile / release-toolkit-gutenberg-mobile

Automation Scripts for Releasing Gutenberg-Mobile Updates to the WordPress Mobile Apps.
Mozilla Public License 2.0
5 stars 2 forks source link

Check that required version of `bundle` is installed #246

Open fluiddot opened 7 months ago

fluiddot commented 7 months ago

I've encountered an error when CLI executed the command preios related to bundler version:

> @wordpress/react-native-editor@1.114.1 preios
> cd ios && (bundle check > /dev/null || bundle install) && bundle exec pod install --repo-update

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.3.18) required by your /private/var/folders/s7/lwl9q12j2_31hw8y1vkmln180000gn/T/gbm-2417695763/gb/packages/react-native-editor/ios/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:2.3.18`
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
    from /usr/bin/bundle:23:in `<main>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.3.18) required by your /private/var/folders/s7/lwl9q12j2_31hw8y1vkmln180000gn/T/gbm-2417695763/gb/packages/react-native-editor/ios/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:2.3.18`
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
    from /usr/bin/bundle:23:in `<main>'
[ERROR] error running npm run core preios: exit status 1

To avoid this issue in the future, it would be great if we check that the bundler version installed is the required one.

fluiddot commented 7 months ago

For reference, I managed to address the issue I shared by installing a newer version and updating the symlink of the binary: sudo gem install bundler -n /usr/local/bin