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

Bundler versions 2.4.22 and 2.5.6 are now available for Ruby Applications #1428

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

schneems
Copy link
Contributor

@schneems schneems commented Feb 22, 2024

Prior #1427
Closing #1408

The Ruby Buildpack now installs a version of bundler based on the major and minor version listed in the Gemfile.lock under the BUNDLED WITH key. Previously, it only used the major version. Now, this logic will be used:

  • BUNDLED WITH 1.x will receive bundler 1.17.3
  • BUNDLED WITH 2.0.x to 2.3.x will receive bundler 2.3.25
  • BUNDLED WITH 2.4.x will receive bundler 2.4.22
  • BUNDLED WITH 2.5.x and above will receive bundler 2.5.6

It is strongly recommended that you have both a RUBY VERSION and BUNDLED WITH version listed in your Gemfile.lock. If you do not have those values, you can generate them and commit them to git:

$ bundle update --ruby
$ git add Gemfile.lock
$ git commit -m "Update Gemfile.lock"

Applications without these values specified in the Gemfile.lock may break unexpectedly when the defaults change.

@schneems schneems force-pushed the schneems/bundler-major-minor branch from 698e845 to 32e71b7 Compare February 22, 2024 21:26
…cations

The [Ruby Buildpack](https://devcenter.heroku.com/articles/ruby-support#libraries) now installs a version of bundler based on the major and minor version listed in the `Gemfile.lock` under the `BUNDLED WITH` key. Previously, it only used the major version. Now, this logic will be used:

- `BUNDLED WITH` 1.x will receive bundler `1.17.3`
- `BUNDLED WITH` 2.0.x to 2.3.x will receive bundler `2.3.25`
- `BUNDLED WITH` 2.4.x will receive bundler `2.4.22`
- `BUNDLED WITH` 2.5.x and above will receive bundler `2.5.6`

It is strongly recommended that you have both a `RUBY VERSION` and `BUNDLED WITH` version listed in your `Gemfile.lock`. If you do not have those values, you can generate them and commit them to git:

```
$ bundle update --ruby
$ git add Gemfile.lock
$ git commit -m "Update Gemfile.lock"
```

Applications without these values specified in the `Gemfile.lock` may break unexpectedly when the defaults change.
@schneems schneems force-pushed the schneems/bundler-major-minor branch from 32e71b7 to 4efd7a7 Compare February 22, 2024 21:46
@schneems schneems marked this pull request as ready for review February 27, 2024 21:58
@schneems schneems requested a review from a team as a code owner February 27, 2024 21:58
@schneems schneems merged commit 56ff138 into main Feb 28, 2024
3 checks passed
@schneems schneems deleted the schneems/bundler-major-minor branch February 28, 2024 18:05
@heroku-linguist heroku-linguist bot mentioned this pull request Feb 28, 2024
dentarg added a commit to Starkast/wikimum that referenced this pull request Mar 3, 2024
Somewhat based on the Dockfile template in Rails:
https://github.com/rails/rails/blob/4f0f3448cde85ff3d1485366231650258ea62b71/railties/lib/rails/generators/rails/app/templates/Dockerfile.tt

Needed after heroku/heroku-buildpack-ruby#1428
because deploys failed like this:

    ...
    Machine started in 390ms
    Activating bundler (>= 0.a) failed:
    Permission denied @ rb_sysopen - /workspace/vendor/bundle/ruby/3.2.0/specifications/bundler-2.5.6.gemspec
    To install the version of bundler this project requires, run `gem install bundler -v '>= 0.a'`
dentarg added a commit to Starkast/wikimum that referenced this pull request Mar 3, 2024
Somewhat based on the Dockfile template in Rails:
https://github.com/rails/rails/blob/4f0f3448cde85ff3d1485366231650258ea62b71/railties/lib/rails/generators/rails/app/templates/Dockerfile.tt

Needed after heroku/heroku-buildpack-ruby#1428
because deploys failed like this:

    ...
    Machine started in 390ms
    Activating bundler (>= 0.a) failed:
    Permission denied @ rb_sysopen - /workspace/vendor/bundle/ruby/3.2.0/specifications/bundler-2.5.6.gemspec
    To install the version of bundler this project requires, run `gem install bundler -v '>= 0.a'`
dentarg added a commit to Starkast/wikimum that referenced this pull request Mar 3, 2024
Somewhat based on the Dockfile template in Rails:
https://github.com/rails/rails/blob/4f0f3448cde85ff3d1485366231650258ea62b71/railties/lib/rails/generators/rails/app/templates/Dockerfile.tt

Needed after heroku/heroku-buildpack-ruby#1428
because deploys failed like this:

    ...
    Machine started in 390ms
    Activating bundler (>= 0.a) failed:
    Permission denied @ rb_sysopen - /workspace/vendor/bundle/ruby/3.2.0/specifications/bundler-2.5.6.gemspec
    To install the version of bundler this project requires, run `gem install bundler -v '>= 0.a'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants