Module: TDiary::Server::CGIEnvironment
- Defined in:
- lib/tdiary/server.rb
Overview
WEBrick's CGI runner clears the environment of the CGI child process before exec'ing it, so the child cannot find the gems the server itself runs with. Hand the RubyGems and Bundler locations back to it.
Instance Method Summary collapse
Instance Method Details
#meta_vars ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/tdiary/server.rb', line 19 def super.merge( { 'HOME' => ENV['HOME'], 'GEM_HOME' => Gem.dir, 'GEM_PATH' => Gem.path.join( File::PATH_SEPARATOR ), 'BUNDLE_GEMFILE' => ENV['BUNDLE_GEMFILE'], }.compact ) end |