title: Heroku Application Error: understanding the logs
body: <p>I just pushed my rails app to Heroku. Then I ran heroku db:migrate then heroku db:push. But when I open the app I get the error "An error occurred in the application and your page could not be served. Please try again in a few moments. If you are the application owner, check your logs for details".</p>
  
  <p>So I ran heroku logs and this is what I get:</p>
  
  <pre><code>$ heroku logs
  2013-05-10T17:13:21.460654+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `instance_exec'
  2013-05-10T17:13:21.461171+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands/server.rb:46:in `app'
  2013-05-10T17:13:21.461171+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
  2013-05-10T17:13:21.461171+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
  2013-05-10T17:13:21.460325+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require': /app/app/controllers/users_controller.rb:54: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '(' (SyntaxError)
  2013-05-10T17:13:21.460325+00:00 app[web.1]:         redirect_to signin_url, notice: t "user.please"
  2013-05-10T17:13:21.460325+00:00 app[web.1]:         ^
  2013-05-10T17:13:21.460325+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require'
  2013-05-10T17:13:21.460325+00:00 app[web.1]: Exiting
  2013-05-10T17:13:21.460654+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `run'
  2013-05-10T17:13:21.460654+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:55:in `block in run_initializers'
  2013-05-10T17:13:21.460654+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `each'
  2013-05-10T17:13:21.461171+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands/server.rb:70:in `start'
  2013-05-10T17:13:21.461171+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:55:in `block in &lt;top (required)&gt;'
  2013-05-10T17:13:21.461171+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:50:in `tap'
  2013-05-10T17:13:21.461171+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
  2013-05-10T17:13:21.461171+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
  2013-05-10T17:13:21.460325+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:313:in `depend_on'
  2013-05-10T17:13:21.460325+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:225:in `require_dependency'
  2013-05-10T17:13:21.460654+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
  2013-05-10T17:13:21.460654+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:438:in `each'
  2013-05-10T17:13:21.460325+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:359:in `require_
  or_load'
  2013-05-10T17:13:21.460896+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `run_initializers'
  2013-05-10T17:13:21.460896+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/application.rb:136:in `initialize!'
  2013-05-10T17:13:21.460896+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
  
  2013-05-10T17:13:21.461171+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/commands.rb:50:in `&lt;top (required)&gt;'
  2013-05-10T17:13:21.461416+00:00 app[web.1]:    from script/rails:6:in `require'
  
  2013-05-10T17:13:21.460896+00:00 app[web.1]:    from /app/config.ru:in `new'
  2013-05-10T17:13:21.460896+00:00 app[web.1]:    from /app/config.ru:in `&lt;main&gt;'
  2013-05-10T17:13:21.461171+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
  2013-05-10T17:13:21.460896+00:00 app[web.1]:    from /app/config/environment.rb:
  5:in `&lt;top (required)&gt;'
  2013-05-10T17:13:21.460896+00:00 app[web.1]:    from /app/config.ru:3:in `requir
  e'
  2013-05-10T17:13:21.460896+00:00 app[web.1]:    from /app/config.ru:3:in `block
  in &lt;main&gt;'
  2013-05-10T17:13:21.460896+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
  2013-05-10T17:13:21.460896+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
  2013-05-10T17:13:21.460325+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
  
  2013-05-10T17:13:21.461416+00:00 app[web.1]:    from script/rails:6:in `&lt;main&gt;'
  2013-05-10T17:13:23.235761+00:00 heroku[web.1]: State changed from starting to c
  rashed
  2013-05-10T17:13:23.221686+00:00 heroku[web.1]: Process exited with status 1
  2013-05-10T17:13:23.237632+00:00 heroku[web.1]: State changed from crashed to st
  arting
  2013-05-10T17:13:24.507187+00:00 heroku[web.1]: Starting process with command `b
  undle exec rails server -p 10305`
  2013-05-10T17:13:27.937367+00:00 app[web.1]: DEPRECATION WARNING: You have Rails
   2.3-style plugins in vendor/plugins! Support for these plugins will be removed
  in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to
  your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release
  notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-h
  as-been-released. (called from &lt;top (required)&gt; at /app/config/environment.rb:5)
  
  2013-05-10T17:13:27.935835+00:00 app[web.1]: DEPRECATION WARNING: You have Rails
   2.3-style plugins in vendor/plugins! Support for these plugins will be removed
  in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to
  your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release
  notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-h
  as-been-released. (called from &lt;top (required)&gt; at /app/config/environment.rb:5)
  
  2013-05-10T17:13:27.938348+00:00 app[web.1]: DEPRECATION WARNING: You have Rails
   2.3-style plugins in vendor/plugins! Support for these plugins will be removed
  in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to
  your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release
  notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-h
  as-been-released. (called from &lt;top (required)&gt; at /app/config/environment.rb:5)
  
  2013-05-10T17:13:31.274313+00:00 app[web.1]: =&gt; Booting WEBrick
  2013-05-10T17:13:31.274313+00:00 app[web.1]: =&gt; Ctrl-C to shutdown server
  2013-05-10T17:13:31.274313+00:00 app[web.1]: =&gt; Call with -d to detach
  2013-05-10T17:13:31.274313+00:00 app[web.1]: =&gt; Rails 3.2.12 application startin
  g in production on http://0.0.0.0:10305
  2013-05-10T17:13:31.274313+00:00 app[web.1]: Connecting to database specified by
   DATABASE_URL
  2013-05-10T17:13:31.512180+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/application/finisher.rb:53:in `block in &lt;modul
  e:Finisher&gt;'
  2013-05-10T17:13:31.511810+00:00 app[web.1]:         redirect_to signin_url, not
  ice: t "user.please"
  2013-05-10T17:13:31.511810+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
  
  2013-05-10T17:13:31.511810+00:00 app[web.1]:
          ^
  2013-05-10T17:13:31.511810+00:00 app[web.1]: Exiting
  2013-05-10T17:13:31.511810+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:359:in `require_
  or_load'
  2013-05-10T17:13:31.512180+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/engin
  e.rb:439:in `block (2 levels) in eager_load!'
  2013-05-10T17:13:31.511810+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/
  activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require': /app/a
  pp/controllers/users_controller.rb:54: syntax error, unexpected tSTRING_BEG, exp
  ecting keyword_do or '{' or '(' (SyntaxError)
  2013-05-10T17:13:31.512434+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
  
  2013-05-10T17:13:31.512434+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
  2013-05-10T17:13:31.512434+00:00 app[web.1]:    from /app/config.ru:3:in `requir
  e'
  2013-05-10T17:13:31.512702+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
  2013-05-10T17:13:31.512180+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/engine.rb:438:in `block in eager_load!'
  2013-05-10T17:13:31.511810+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dep
  endency'
  2013-05-10T17:13:31.511810+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in
   require'
  2013-05-10T17:13:31.511810+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:225:in `require_
  dependency'
  2013-05-10T17:13:31.512180+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/engine.rb:436:in `eager_load!'
  2013-05-10T17:13:31.512180+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/initializable.rb:55:in `block in run_initializ
  ers'
  2013-05-10T17:13:31.512434+00:00 app[web.1]:    from /app/config.ru:in `&lt;main&gt;'
  2013-05-10T17:13:31.512702+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/commands/server.rb:46:in `app'
  2013-05-10T17:13:31.512434+00:00 app[web.1]:    from /app/config/environment.rb:
  5:in `&lt;top (required)&gt;'
  2013-05-10T17:13:31.511810+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:313:in `depend_o
  n'
  2013-05-10T17:13:31.512702+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/commands/server.rb:70:in `start'
  2013-05-10T17:13:31.512434+00:00 app[web.1]:    from /app/config.ru:in `new'
  2013-05-10T17:13:31.512702+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
  2013-05-10T17:13:31.512702+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/commands.rb:55:in `block in &lt;top (required)&gt;'
  2013-05-10T17:13:31.512991+00:00 app[web.1]:    from script/rails:6:in `&lt;main&gt;'
  2013-05-10T17:13:31.512180+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/engine.rb:438:in `each'
  2013-05-10T17:13:31.512180+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `run'
  2013-05-10T17:13:31.512180+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `instance_exec'
  2013-05-10T17:13:31.512434+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
  2013-05-10T17:13:31.512434+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/application.rb:136:in `initialize!'
  2013-05-10T17:13:31.512991+00:00 app[web.1]:    from script/rails:6:in `require'
  
  2013-05-10T17:13:31.512702+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
  2013-05-10T17:13:31.512702+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
  2013-05-10T17:13:31.512180+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/engine.rb:436:in `each'
  2013-05-10T17:13:31.512434+00:00 app[web.1]:    from /app/config.ru:3:in `block
  in &lt;main&gt;'
  2013-05-10T17:13:31.512702+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
  2013-05-10T17:13:31.512702+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/commands.rb:50:in `tap'
  2013-05-10T17:13:31.512180+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `each'
  2013-05-10T17:13:31.512434+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `run_initializers'
  2013-05-10T17:13:31.512702+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9
  .1/gems/railties-3.2.12/lib/rails/commands.rb:50:in `&lt;top (required)&gt;'
  2013-05-10T17:13:42.307007+00:00 heroku[web.1]: Process exited with status 1
  2013-05-10T17:13:42.323377+00:00 heroku[web.1]: State changed from starting to c
  rashed
  2013-05-10T17:13:55.228036+00:00 heroku[api]: Starting process with command `bun
  dle exec rake db:migrate` by muyiwamat@gmail.com
  2013-05-10T17:13:57.306953+00:00 heroku[run.6043]: Awaiting client
  2013-05-10T17:13:57.324094+00:00 heroku[run.6043]: Starting process with command
   `bundle exec rake db:migrate`
  2013-05-10T17:13:58.232657+00:00 heroku[run.6043]: State changed from starting t
  o up
  2013-05-10T17:14:06.400819+00:00 heroku[run.6043]: Process exited with status 0
  2013-05-10T17:14:06.419565+00:00 heroku[run.6043]: State changed from up to comp
  lete
  2013-05-10T17:17:30.518444+00:00 heroku[router]: at=error code=H10 desc="App cra
  shed" method=GET path=/ host=immense-refuge-9281.herokuapp.com fwd="94.116.4.100
  " dyno= connect= service= status=503 bytes=
  2013-05-10T17:17:30.975159+00:00 heroku[router]: at=error code=H10 desc="App cra
  shed" method=GET path=/favicon.ico host=immense-refuge-9281.herokuapp.com fwd="9
  4.116.4.100" dyno= connect= service= status=503 bytes=
  </code></pre>
  
  <p>I can barely make any sense of this files up here. Is there anything I might be doing wrong? I'm using Rails 3.2 and I already made sure I used heroku --stack cedar because I read somewhere that heroku only supports Rails 3 on the cedar stack.</p>
  
  <p>--UPDATE--
  As requested by Leo Correa below is a snippet of my users_controller.rb </p>
  
  <pre><code>def signed_in_user
       unless signed_in?
          store_location
          redirect_to (signin_url, notice: t("user.please")) 
       end
      end
  </code></pre>