ruby on rails - uninitialized constant ActionView::CompiledTemplates::RAILS_ENV -
i added application.html.erb file:
<%= render :partial => 'layouts/ga' if rails_env == 'production' %>
and error uninitialized constant actionview::compiledtemplates::rails_env
on exact line.
when take if rails_env == 'production'
off, error goes away isn't suppose work fine? error tries tell me?
rails_env
should key in environment variable array env
. try:
<%= render :partial => 'layouts/ga' if env["rails_env"] == 'production' %>
or,
<%= render :partial => 'layouts/ga' if rails.env.production? %>
Comments
Post a Comment