On Sep 11, 2013, at 11:25 AM, "Jason Hsu, Rubyist" <[email protected]> wrote:
> I recently upgraded Bargain Stock Funds (http://www.bargainstockfunds.com) > and Doppler Value Investing (http://www.dopplervalueinvesting.com) from Rails > 3.2 to Rails 4.0. > > I've noticed that the debug information is on the production web site even > though the app/views/layouts/application.html.erb file has the line "<%= > debug(params) if Rails.env.development? %>". This SHOULD suppress the debug > information on each page in the production environment, but it doesn't seem > to be working. (The technical tabs on both web sites contain the links to > the source code.) This tells me you are not running with RAILS_ENV='production'. Instead, it is either not set (defaults to 'development') or is set to 'development'. > > Commenting out the "<%= debug(params) if Rails.env.development? %>" line does > remove the debug information, but I need to retain it in the development > environment. Thus, I believe that my production environment is being > mistaken for the development environment. > > My questions: > 1. How do I confirm whether I'm in the development or production > environment? My assumptions don't seem to be holding up. You check Rails.env or ENV['RAILS_ENV'] > 2. What is the mechanism that specifies the development or production > environment? The RAILS_ENV environment variable is set to the environment you want loaded. If it is not set or empty, it defaults to 'development'. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/8b16c0e3-0193-474a-ab7f-cc942ef6def0%40googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CD57E77C-3940-4269-8A39-9A8D5C985793%40gmail.com. For more options, visit https://groups.google.com/groups/opt_out.

