evilmartians / ruby-on-whales

Ruby on Whales example and templates
MIT License
295 stars 26 forks source link

feat: Make the Bundler version configurable #4

Closed oliverklee closed 2 years ago

oliverklee commented 2 years ago

Heroku does not always use the latest version of Bundler, but sometimes uses older versions to avoid some bugs:

https://github.com/heroku/heroku-buildpack-ruby/commit/d42226c1dc0dfbc123b1facaeae276cf3d2689a6

For the local development environment to match the setup on Heroku, the Bundler version needs to be configurable.

palkan commented 2 years ago

For the local development environment to match the setup on Heroku, the Bundler version needs to be configurable.

Recent Bundler versions automatically use the version specified in the Gemfile.lock, so we don't need to install it ourselves.

Here is what I see running bundle install with BUNDLED WITH 2.2.33:

Bundler 2.3.9 is running, but your lockfile was generated with 2.2.33. Installing Bundler 2.2.33 and restarting using that version.
Fetching gem metadata from https://rubygems.org/.
Fetching bundler 2.2.33
Installing bundler 2.2.33
...

You can manually edit the .lock file to specify the Heroku-supported version.

oliverklee commented 2 years ago

Thanks, setting the Bundler version via Gemfile.lock indeed works without my changes! So this change is not needed. Closing.