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:
parent
328687d8de
commit
b209db959a
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue