You must use Bundler 2 or greater with this lockfile


#1

Bitrise Build Issue Report template

Description of the issue

I need Bundler 2+ but Bitrise has 1.x only.
If I do nothing I get

Install Fastlane with bundler
$ bundle "install" "--jobs" "20" "--retry" "5"
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
You must use Bundler 2 or greater with this lockfile.
Command failed, error: exit status 20

If I try to update Bundler using a script I get:

+ gem install bundler
ERROR:  Error installing bundler:
	"bundle" from bundler conflicts with /usr/local/bin/bundle

Environment:

Bitrise - Android & Docker, on Ubuntu 16.04

Any help ? In the meantime I will rollback to earlier version of bundler but help would be appreciated.

thank you
nicolas


#2

Hello there!

Could you provide the url of this build so we can check the logs for more details?

also, are you running a fastlane step or you run this from a script step? in fastlane step if you set Should update fastlane gem before run to true, this should be no problem.


#3

@fehersanyi-bitrise I’m facing similar issue. With an iOS build, but the root of the problem is the same: Unable to update the bundler to 2.0 to use it with a Gemfile.lock bundled using 2.0.1.


#4

Hello,

I had the same problem on Xcode 10.1.x, on macOS 10.13. In my case, we had a Makefile with bundle exec fastlane scan. This failed because the system-installed bundler had invalid (or lack of) concurrent-ruby gem.

Tried installing Ruby 2.6.0 into a rbenv but this was like going into a rabbit hole of dep. issues so I forgo this.

I solved it by running the Fastlane step with scan command directly, without bundler and it worked. Maybe this works in your case as well.


#5

Hy @FWIgor and @rszalski

the workaround that seems to be working right now is to uninstall and reinstall bundle as it is.


#6

@fehersanyi-bitrise How can I uninstall the bundler? A “simple” approach of running gem uninstall bundler do not work, and give me the error:

Uninstalling bundler
Gem 'bundler' is not installed

Installing bundler, version 2.0.1
ERROR: Error installing bundler:
"bundle" from bundler conflicts with /usr/local/bin/bundle

#7

Hy there! @FWIgor sorry for the late response!

the solution is “May the --force be with you!”