diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-05-25 20:29:55 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-05-25 20:32:34 -0700 |
commit | 8fc898a63e742190903d331958d3b6627f819624 (patch) | |
tree | 8956a082e64bbc1287b4eadb27267b71948c1ce9 /lib/unicorn.rb | |
parent | 2c6f625b6cb46be5c2dfc056680ba8dc2c19e334 (diff) | |
download | unicorn-8fc898a63e742190903d331958d3b6627f819624.tar.gz |
On application reloads, Gems installed by the Ruby instance may be different than when Unicorn started. So when preload_app is false, HUP-ing Unicorn will always refresh the list of Gems before loading the application code.
Diffstat (limited to 'lib/unicorn.rb')
-rw-r--r-- | lib/unicorn.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb index 4a4e2e1..1ca0113 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -582,6 +582,10 @@ module Unicorn end def build_app! + if defined?(Gem) && Gem.respond_to?(:refresh) + logger.info "Refreshing Gem list" + Gem.refresh + end @app = @app.call if @app.respond_to?(:arity) && @app.arity == 0 end |