[#819] set RAILS_ENV if only RACK_ENV is provided

This commit is contained in:
Holger Just 2012-01-06 00:56:57 +01:00
parent 939fd0b9fa
commit 4c0b195380
1 changed files with 3 additions and 0 deletions

View File

@ -18,6 +18,9 @@
# you don't control web/app server and can't set it the proper way
# ENV['RAILS_ENV'] ||= 'production'
# use RACK_ENV if we are running as a simple rack app
ENV['RAILS_ENV'] ||= ENV['RACK_ENV'] if ENV['RACK_ENV']
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.14' unless defined? RAILS_GEM_VERSION