title: Moving Rails app to production with nginx
body: <p>I'm on a VPS.  I created a new rails app with <code>rails new rails_app -d mysql</code>.
  I'm running nginx with passenger. I'm running Rails 3.2.12 and Ruby 1.9.3. In my nginx.conf file I added the following to the <code>server</code> directive:</p>
  
  <pre><code>listen       80;
  server_name  www.mydomain.com;
  passenger_enabled on;
  root /home/mike/www/rails_app/public;
  rails_env production;
  </code></pre>
  
  <p>When I point to www.mydomain.com I see Welcome aboard You’re riding Ruby on Rails!.  When I click on About your application’s environment I get this error:</p>
  
  <pre><code>The page you were looking for doesn't exist.
  </code></pre>
  
  <p>When I check my production.log I see this error and don't know what to do with it:</p>
  
  <pre><code>ActionController::RoutingError (No route matches [GET] "/rails/info/properties")
  </code></pre>
  
  <p>I've been up all night and have read all SO issues similar to this but still I cannot resolve my issue. If I run this in development everything works fine.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I found this explanation for a Rails 2.3.4 problem: The link fires off an AJAX request to rails/info/properties. The properties action is defined in the Rails::InfoController which lives in /rails/railties/builtin/rails_info/rails/info_controller.rb.</p>
  
  <p>The route doesn't need to be explicitly defined because it conforms to the Rails default route of :controller/:action/:id (although there is no ID in this case and the controller lives within a Rails namespace.)</p>
  
  <p>But I don't see <code>info_controller.rb</code> anywhere.</p>
  
  <p>Ok I found this: <code>config.consider_all_requests_local</code> is a flag. If true then any error will cause detailed debugging information to be dumped in the HTTP response, and the Rails::Info controller will show the application runtime context in /rails/info/properties. True by default in development and test environments, and false in production mode. For finer-grained control, set this to false and implement local_request? in controllers to specify which requests should provide debugging information on errors.</p>
  
  <p>but setting this to false does nothing.</p>
  
  <p><strong>EDIT 2</strong>
  Ok, I'm an idiot.  Found this somewhere: <code>You're clicking the "About your application’s environment" link on the Rails default index.html page. This link only works in development environment, not in production.</code> </p>
  
  <p>And this entire night I thought my Rails app wasn't working. So I guess I'll give up and go to sleep.</p>