1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
Commit graph

2 commits

Author SHA1 Message Date
Chris LaRose
c87f088396
Leave BUNDLE_GEMFILE unset in workers if it was unset in the master (#2154)
* Leave BUNDLE_GEMFILE unset in workers if it was unset in the master

Co-Authored-By: Tim Morgan <tim@timmorgan.org>

* Use Bundler.original_env instead of raw environment variables

Co-authored-by: Tim Morgan <tim@timmorgan.org>
Co-authored-by: Nate Berkopec <nate.berkopec@gmail.com>
2020-03-10 11:46:20 -06:00
Tim Morgan
4cfd3b8302 Preserve BUNDLE_GEMFILE and other Bundler env vars
Starting your server with BUNDLE_GEMFILE=Gemfile.rails6 would delete this
environment variable on app restart when using --prune-bundler, when all
you really want is to restore the variable to what it was before Bundler
was activated.

Writing a test for this proved to be difficult because the bug only seems
to manifest itself when running the server under the following conditions:

- Using `bundle exec` to run the puma command
- Using a non-zero number of workers, e.g. `-w 2`
- Setting `BUNDLE_GEMFILE` to something other than "Gemfile"
2020-02-12 16:41:12 -06:00