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

also forget about BUNDLE_GEMFILE etc settings bundler sets up before loading puma

when restarting a symlinked server the BUNDLE_GEMFILE env var
will point to the old releases Gemfile ... which results in running gems that
do not belong to the current release
This commit is contained in:
Michael Grosser 2017-05-03 10:18:54 -07:00
parent 328687d8de
commit b209db959a
No known key found for this signature in database
GPG key ID: B19DB1587D698ED7

View file

@ -163,7 +163,7 @@ module Puma
# Run the server. This blocks until the server is stopped
def run
env = ENV.to_h
previous_env = (defined?(Bundler) ? Bundler.clean_env : ENV.to_h)
@config.clamp
@ -180,7 +180,7 @@ module Puma
graceful_stop
when :restart
log "* Restarting..."
ENV.replace(env)
ENV.replace(previous_env)
@runner.before_restart
restart!
when :exit