How to get the current environement in which app is running

Hi,

From within my rails app code, is it possible to get the current environment in which it is running? Such as development / production.

Regards,

Fernando Perez wrote:

Hi,

From within my rails app code, is it possible to get the current environment in which it is running? Such as development / production.

Regards,

use <%=RAILS_ENV%>

use <%=RAILS_ENV%>

Thanks! :slight_smile:

or you can do Rails.env.production?

ENV['RAILS_ENV']