Patches: Browse | Submit New | Admin

[#21613] Warbler should respect RAILS_ENV variable

Date:
2008-08-20 00:47
Priority:
3
Submitted By:
Nobody
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Warbler should respect RAILS_ENV variable

Detailed description
Warbler should respect RAILS_ENV variable and when it is defined, it should use it as the environment for the web.xml.
If the variable is not defined, warbler should fall back to "production" environment.

Patch for my config/warble.rb:

diff --git a/foo/config/warble.rb b/foo/config/warble.rb
--- a/foo/config/warble.rb
+++ b/foo/config/warble.rb
@@ -55,7 +55,7 @@ Warbler::Config.new do |config|
   # config.war_name = "mywar"
 
   # Value of RAILS_ENV for the webapp
-  config.webxml.rails.env = 'production'
+  config.webxml.rails.env = ENV['RAILS_ENV'] || 'production'
 
   # Application booter to use, one of :rack, :rails, or :merb. (Default :rails)
   # config.webxml.booter = :rails

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item