bitrise-steplib / steps-ios-auto-provision

MIT License
20 stars 33 forks source link

step failing because bundler isn't up to date #106

Closed arielelkin closed 4 years ago

arielelkin commented 4 years ago

Build log:

+------------------------------------------------------------------------------+

| (5) ios-auto-provision                                                       |
+------------------------------------------------------------------------------+
| id: ios-auto-provision                                                       |
| version: 1.5.0                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: bash                                                                |
| time: 2020-01-10T09:05:42Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
$ bundle install
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/site_ruby/2.6.0/rubygems.rb:275:in `find_spec_for_exe': Could not find 'bundler' (1.17.3) required by your /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise219760325/step_src/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:1.17.3`
    from /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/site_ruby/2.6.0/rubygems.rb:294:in `activate_bin_path'
    from /Users/vagrant/.rbenv/versions/2.6.5/bin/bundle:23:in `<main>'
bundle install failed
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | ios-auto-provision (exit code: 1)                             | 5.59 sec |
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...github.com/bitrise-steplib/steps-ios-auto-provision/issues |
| Source: https://github.com/bitrise-steplib/steps-ios-auto-provision          |
+---+---------------------------------------------------------------+----------+

I'm currently using the Xcode Edge stack, which has Bundler 2.1.2 https://github.com/bitrise-io/bitrise.io/blob/master/system_reports/osx-xcode-edge.log#L419

cathyharmon commented 4 years ago

Hello,

There have been very recent releases that have become available. These should be reflected soon in the rebuild of the Xcode Edge stack so hopefully this won't be a problem on Monday.

In the meantime, you can uninstall/install the version you need in a script step. Also, you might want to check out the following community step:

https://github.com/FutureWorkshops/bitrise-step-install-bundler

arielelkin commented 4 years ago

Hi @cathyharmon

Happy Monday! We're still seeing the same issue. Do you have an ETA for when this will be resolved?

Thanks

cain004 commented 4 years ago

I'm also seeing this issue with the Xcode 11.3.x stack. Any ETA?

cathyharmon commented 4 years ago

My apologies! I misread the issue and thought you were asking for the latest version of the bundler to be provided in the Xcode stack instead of bundler 2.1.2.

Looking at the error, it seems that bundler 1.17.3 is being looked for and not found. Not surprising as the stack provides bundler 2.1.2!

This appears to be a problem with RubyGems and dealing with the version of bundler used. (see https://github.com/rubygems/bundler/issues/6882)

Can you check your Gemfile.lock file and delete the BUNDLED WITH section? Others have deleted their `Gemfile.lock' file and recreated under the newer version of the bundler.

pabdavis commented 4 years ago

Hi @cathyharmon, Are you saying that removing line 196-197 in this Gemfile.lock https://github.com/bitrise-steplib/steps-ios-auto-provision/blob/6d6b7be47791e3bebfac285a6692fd748e524216/Gemfile.lock#L196 will fix this issue?

The Gemfile.lock that you mention is part of this step.

cathyharmon commented 4 years ago

There is a fix in progress, but there are several work-arounds you can use:

You can use a script step prior to the ios-auto-provision step to install the bundler version:

`gem install bundler:1.17.3'

Or you can delete the BUNDLED WITH lines you specified Or you can delete the Gemlock.file

Hopefully this will be fixed very soon and these workarounds will not be needed!

cain004 commented 4 years ago

A script step prior actually fails:

+------------------------------------------------------------------------------+

| (3) script@1.1.5                                                             |
+------------------------------------------------------------------------------+
| id: script                                                                   |
| version: 1.1.5                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: bash                                                                |
| time: 2020-01-14T19:50:57Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
+ gem install bundler:1.17.3
ERROR:  Error installing bundler:
    "bundle" from bundler conflicts with /Users/vagrant/.rbenv/versions/2.6.5/bin/bundle

Is there a bitrise environment var with the path to where this is so I can delete the Gemlock.file?

cathyharmon commented 4 years ago

Hmm - can you try:

gem install bundler --force -v 2.0.1

I believe that should allow multiple versions to co-exist. Sorry about that

cain004 commented 4 years ago

I think you meant gem install bundler --force -v 1.17.3 This is working for me now. Thanks! For those interested, add a Script step just before the iOS Auto Provision. Below is the simple script I used:

#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x

# write your script here
gem install bundler --force -v 1.17.3
cathyharmon commented 4 years ago

@cain004 THANKS!

moodagent commented 4 years ago

Seems to work with 2.0.1 as well.

mikeberlin commented 4 years ago

So it seems this was a quick fix. Thank you for posting it!

Will this be resolved at a later date so we don't need to include this step?

cathyharmon commented 4 years ago

Yes, this should be used as a workaround.

arielelkin commented 4 years ago

fixed in 1.5.1

thanks!