title: Not getting any useful log output from Rails3 app on DreamHost
body: <p>I'm trying to deploy an extremely simple Rails application on my shared DreamHost account, and am stuck. The log output doesn't seem to tell me what is wrong.</p>
  
  <p>When I access any resource of the app in the browser, it returns the standard 404 error page (public/404.html). All that the log/production.log file says:</p>
  
  <pre><code>Started GET "/" for 198.144.202.78 at Wed Aug 15 14:34:58 -0700 2012 Processing by HomeController#index as HTML   Rendered home/index.html.erb within layouts/application (5.3ms)
  
  
  Started GET "/internal_error.html" for 198.144.202.78 at Wed Aug 15 14:34:58 -0700 2012
  
  ActionController::RoutingError (No route matches [GET] "/internal_error.html"):
    actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
    actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
    railties (3.2.8) lib/rails/rack/logger.rb:26:in `call_app'
    railties (3.2.8) lib/rails/rack/logger.rb:16:in `call'
    actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in `call'
    rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
    rack (1.4.1) lib/rack/runtime.rb:17:in `call'
    activesupport (3.2.8) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
    rack (1.4.1) lib/rack/lock.rb:15:in `call'
    rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
    rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch'
    rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup'
    rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!'
    rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
    railties (3.2.8) lib/rails/engine.rb:479:in `call'
    railties (3.2.8) lib/rails/application.rb:223:in `call'
    railties (3.2.8) lib/rails/railtie/configurable.rb:30:in `send'
    railties (3.2.8) lib/rails/railtie/configurable.rb:30:in `method_missing'
    /dh/passenger/lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
    /dh/passenger/lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
    /dh/passenger/lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
    /dh/passenger/lib/phusion_passenger/rack/application_spawner.rb:205:in `start_request_handler'
    /dh/passenger/lib/phusion_passenger/rack/application_spawner.rb:170:in `send'
    /dh/passenger/lib/phusion_passenger/rack/application_spawner.rb:170:in `handle_spawn_application'
    /dh/passenger/lib/phusion_passenger/utils.rb:479:in `safe_fork'
    /dh/passenger/lib/phusion_passenger/rack/application_spawner.rb:165:in `handle_spawn_application'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:180:in `start'
    /dh/passenger/lib/phusion_passenger/rack/application_spawner.rb:128:in `start'
    /dh/passenger/lib/phusion_passenger/spawn_manager.rb:253:in `spawn_rack_application'
    /dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
    /dh/passenger/lib/phusion_passenger/spawn_manager.rb:246:in `spawn_rack_application'
    /dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
    /dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    /dh/passenger/lib/phusion_passenger/spawn_manager.rb:244:in `spawn_rack_application'
    /dh/passenger/lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application'
    /dh/passenger/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    /dh/passenger/helper-scripts/passenger-spawn-server:99
  </code></pre>
  
  <p>As I understand, the only error being reported is that it cannot find the "internal_error.html" page to redirect to. (Although I did create one at public/internal_error.html - that didn't help). In any case, it doesn't tell me what error it encountered (which is what I'm looking for). I have set config.log_level = :debug in config/environments/production.rb.</p>
  
  <p>The apache error log (~/logs/MY_DOMAIN/http/error.log) only says:</p>
  
  <pre><code>[Wed Aug 15 14:34:58 2012] [error] [client 198.144.202.78] Premature end of script headers:
  </code></pre>
  
  <p>Anyway, here's my Gemfile:</p>
  
  <pre><code>source 'https://rubygems.org'
  gem 'rails', '3.2.8'
  # Bundle edge Rails instead:
  # gem 'rails', :git =&gt; 'git://github.com/rails/rails.git'
  gem 'sqlite3'
  gem 'mysql2'
  gem 'json'
  # Gems used only for assets and not required
  # in production environments by default.
  group :assets do
    gem 'sass-rails',   '~&gt; 3.2.3'
  #  gem 'coffee-rails', '~&gt; 3.2.1'
    # See https://github.com/sstephenson/execjs#readme for more supported runtimes
    # gem 'therubyracer', :platforms =&gt; :ruby
    gem 'uglifier', '&gt;= 1.0.3'
  end
  gem 'jquery-rails'
  gem 'ruby-debug'
  gem "rake", "0.8.7"
  #gem "rmagick"
  # gem "rmagick", "&gt;= 1.15", :require =&gt; 'RMagick'
  gem "rmagick", "1.15.14", :require =&gt; 'RMagick'
  gem "carrierwave"
  gem "therubyracer"
  </code></pre>
  
  <p>Some details on the environment:</p>
  
  <p>rails - using ~/.gems/bin/rails version 3.2.8
  ruby - using /usr/bin/ruby as far as I can tell version 1.8.7
  rake - using /usr/lib/ruby/gems/1.8/bin//rake version 0.8.7</p>
  
  <p>I was able to successfully run bundle and rake db:migrate (after jumping through lots of hoops).</p>