fix condition for rails_env check