View Single Post
  #1  
Old 01-29-2010, 02:47 PM
thbar thbar is offline
Member
 
Join Date: Sep 2006
Posts: 33
Default ENV['RAILS_ENV'] returns nil when called inside Rails 2.3.4 initializer

Hello,

if I use an initializer under config/initializer/myfile.rb, it seems that when the code is called, ENV['RAILS_ENV'] is empty when I use LiteSpeed, whereas it has a value of development or production if I use ruby script/server.

Is it a known issue ?

My work-around has been to hard-code to production for the moment.

thanks,

-- Thibaut
Reply With Quote