Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Puma CI fails when using Bundler 2 #1984

Closed
eregon opened this issue Apr 2, 2020 · 4 comments
Closed

Puma CI fails when using Bundler 2 #1984

eregon opened this issue Apr 2, 2020 · 4 comments
Assignees
Milestone

Comments

@eregon
Copy link
Member

eregon commented Apr 2, 2020

See https://github.com/puma/puma/runs/553627450

/home/runner/.rubies/truffleruby-head/lib/mri/bundler/lockfile_parser.rb:108:in `warn_for_outdated_bundler_version': You must use Bundler 2 or greater with this lockfile. (Bundler::LockfileError)
	from /home/runner/.rubies/truffleruby-head/lib/mri/bundler/lockfile_parser.rb:95:in `initialize'
	from /home/runner/.rubies/truffleruby-head/lib/mri/bundler/definition.rb:83:in `new'
	from /home/runner/.rubies/truffleruby-head/lib/mri/bundler/definition.rb:83:in `initialize'
	from /home/runner/.rubies/truffleruby-head/lib/mri/bundler/dsl.rb:234:in `new'
	from /home/runner/.rubies/truffleruby-head/lib/mri/bundler/dsl.rb:234:in `to_definition'
	from /home/runner/.rubies/truffleruby-head/lib/mri/bundler/dsl.rb:13:in `evaluate'
	from /home/runner/.rubies/truffleruby-head/lib/mri/bundler/definition.rb:34:in `build'
	from /home/runner/.rubies/truffleruby-head/lib/mri/bundler.rb:135:in `definition'
	from /home/runner/.rubies/truffleruby-head/lib/mri/bundler.rb:101:in `setup'
	from /home/runner/.rubies/truffleruby-head/lib/mri/bundler/setup.rb:20:in `<top (required)>'
	from bin/puma:1:in `require'
	from bin/puma:1:in `<main>'

Which looks like the shipped bundler (which is Bundler 1) gets required instead of Bundler 2, when the bundle install before was done with Bundler 2.

It most likely happens since ruby/setup-ruby installs Ruby 2 by default if there is no Gemfile.lock:
ruby/setup-ruby#38 (comment)

cc @nateberkopec

@eregon eregon self-assigned this Apr 2, 2020
@eregon
Copy link
Member Author

eregon commented Apr 2, 2020

I cannot reproduce the failure locally (with truffleruby-jvm).
For now let's use Bundler 1 in Puma's CI, there are other issues notably on Ruby 2.3 with Bundler 2:
puma/puma#2214

@bjfish
Copy link
Contributor

bjfish commented Apr 24, 2020

This may be related to #1987

@eregon
Copy link
Member Author

eregon commented May 5, 2020

FWIW, the failure on MRI 2.3 with Bundler 2 is most likely due to rubygems/rubygems#3570 (comment)

@eregon eregon added this to the 20.2.0 milestone May 5, 2020
@eregon
Copy link
Member Author

eregon commented May 5, 2020

TruffleRuby now works fine with Bundler 2 when running in Puma's CI: https://github.com/eregon/puma/runs/647762836

#1987 and #1956 fixed this.

I'll make a PR to Puma to use the latest Bundler once the Ruby 2.3 bug is resolved (ruby/setup-ruby#51).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants