title: Rails + Heroku : ActionView::Template::Error
body: <p>I'm having trouble deploying my rails app to heroku. I just fixed an error <a href="https://stackoverflow.com/questions/13041271/rails-heroku-were-sorry-but-something-went-wrong">Rails + Heroku : We&#39;re sorry, but something went wrong</a> but I guess there were more. Can anyone help guide me on how to debug it? I am stuck because heroku doesn't tell me what line the error occurs. Sorry for the bother.</p>
  
  <p>Here's all my code if you want to take a look.
  <a href="https://github.com/EdmundMai/pholderbeta" rel="nofollow noreferrer">https://github.com/EdmundMai/pholderbeta</a></p>
  
  <p>Let me know if you want me to paste anything.</p>
  
  <p>Heroku Logs:</p>
  
  <pre><code>2012-10-29T16:43:41+00:00 app[web.1]: Completed 500 Internal Server Error in 328ms
  2012-10-29T16:43:41+00:00 app[web.1]: 
  2012-10-29T16:43:41+00:00 app[web.1]: LINE 4:              WHERE a.attrelid = '"users"'::regclass
  2012-10-29T16:43:41+00:00 app[web.1]: ActionView::Template::Error (PG::Error: ERROR:  relation "users" does not exist
  2012-10-29T16:43:41+00:00 app[web.1]:                                         ^
  2012-10-29T16:43:41+00:00 app[web.1]:                 ON a.attrelid = d.adrelid AND a.attnum = d.adnum
  2012-10-29T16:43:41+00:00 app[web.1]:               FROM pg_attribute a LEFT JOIN pg_attrdef d
  2012-10-29T16:43:41+00:00 app[web.1]: :             SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
  2012-10-29T16:43:41+00:00 app[web.1]:              WHERE a.attrelid = '"users"'::regclass
  2012-10-29T16:43:41+00:00 app[web.1]:                AND a.attnum &gt; 0 AND NOT a.attisdropped
  2012-10-29T16:43:41+00:00 app[web.1]:              ORDER BY a.attnum
  2012-10-29T16:43:41+00:00 app[web.1]: ):
  2012-10-29T16:43:41+00:00 app[web.1]:     1: 
  2012-10-29T16:43:41+00:00 app[web.1]:     2:        &lt;nav class="clearfix"&gt;
  2012-10-29T16:43:41+00:00 app[web.1]:     3:            &lt;% if !signed_in? %&gt;
  2012-10-29T16:43:41+00:00 app[web.1]:     4:                &lt;%= link_to "home", root_url %&gt;
  2012-10-29T16:43:41+00:00 app[web.1]:     5:            &lt;% else %&gt;
  2012-10-29T16:43:41+00:00 app[web.1]:     6:                &lt;%= link_to "my profile", current_user %&gt;
  2012-10-29T16:43:41+00:00 app[web.1]:   app/helpers/sessions_helper.rb:26:in `current_user'
  2012-10-29T16:43:41+00:00 app[web.1]:   app/helpers/sessions_helper.rb:13:in `signed_in?'
  2012-10-29T16:43:41+00:00 app[web.1]:   app/views/layouts/_header.html.erb:3:in `_app_views_layouts__header_html_erb__4262906123720065777_48014220'
  2012-10-29T16:43:41+00:00 app[web.1]: 
  2012-10-29T16:43:41+00:00 app[web.1]:   app/views/layouts/application.html.erb:13:in `_app_views_layouts_application_html_erb__2281927286696150034_48418280'
  2012-10-29T16:43:41+00:00 app[web.1]: 
  2012-10-29T16:43:41+00:00 heroku[router]: GET pacific-ravine-3563.herokuapp.com/favicon.ico dyno=web.1 queue=0 wait=0ms service=11ms status=200 bytes=1150
  2012-10-29T16:46:26+00:00 heroku[slugc]: Slug compilation started
  2012-10-29T16:46:53+00:00 heroku[web.1]: State changed from up to starting
  2012-10-29T16:46:53+00:00 heroku[slugc]: Slug compilation finished
  2012-10-29T16:46:56+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 30276`
  2012-10-29T16:46:57+00:00 heroku[web.1]: Stopping all processes with SIGTERM
  2012-10-29T16:46:58+00:00 app[web.1]: [2012-10-29 16:46:58] ERROR SignalException: SIGTERM
  2012-10-29T16:46:58+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/server.rb:90:in `select'
  2012-10-29T16:47:04+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-has-been-released. (called from &lt;top (required)&gt; at /app/config/environment.rb:5)
  2012-10-29T16:47:04+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-has-been-released. (called from &lt;top (required)&gt; at /app/config/environment.rb:5)
  2012-10-29T16:47:08+00:00 heroku[web.1]: Error R12 (Exit timeout) -&gt; At least one process failed to exit within 10 seconds of SIGTERM
  2012-10-29T16:47:08+00:00 heroku[web.1]: Stopping remaining processes with SIGKILL
  2012-10-29T16:47:08+00:00 app[web.1]: =&gt; Booting WEBrick
  2012-10-29T16:47:08+00:00 app[web.1]: =&gt; Rails 3.2.8 application starting in production on http://0.0.0.0:30276
  2012-10-29T16:47:08+00:00 app[web.1]: =&gt; Call with -d to detach
  2012-10-29T16:47:08+00:00 app[web.1]: =&gt; Ctrl-C to shutdown server
  2012-10-29T16:47:08+00:00 app[web.1]: Connecting to database specified by DATABASE_URL
  2012-10-29T16:47:09+00:00 app[web.1]: [2012-10-29 16:47:09] INFO  WEBrick 1.3.1
  2012-10-29T16:47:09+00:00 app[web.1]: [2012-10-29 16:47:09] INFO  ruby 1.9.2 (2011-07-09) [x86_64-linux]
  2012-10-29T16:47:09+00:00 app[web.1]: [2012-10-29 16:47:09] INFO  WEBrick::HTTPServer#start: pid=2 port=30276
  2012-10-29T16:47:10+00:00 heroku[web.1]: Process exited with status 137
  2012-10-29T16:47:10+00:00 heroku[web.1]: State changed from starting to up
  2012-10-29T16:47:46+00:00 app[web.1]: Started GET "/" for 66.108.172.226 at 2012-10-29 16:47:46 +0000
  2012-10-29T16:47:46+00:00 app[web.1]: 
  2012-10-29T16:47:46+00:00 app[web.1]: 
  2012-10-29T16:47:46+00:00 app[web.1]: Processing by HomeController#index as HTML
  2012-10-29T16:47:46+00:00 app[web.1]:   Rendered home/index.html.erb within layouts/application (12.3ms)
  2012-10-29T16:47:46+00:00 app[web.1]: ActionView::Template::Error (PG::Error: ERROR:  relation "users" does not exist
  2012-10-29T16:47:46+00:00 app[web.1]:                                         ^
  2012-10-29T16:47:46+00:00 app[web.1]:              WHERE a.attrelid = '"users"'::regclass
  2012-10-29T16:47:46+00:00 app[web.1]:               FROM pg_attribute a LEFT JOIN pg_attrdef d
  2012-10-29T16:47:46+00:00 app[web.1]:                AND a.attnum &gt; 0 AND NOT a.attisdropped
  2012-10-29T16:47:46+00:00 app[web.1]:                 ON a.attrelid = d.adrelid AND a.attnum = d.adnum
  2012-10-29T16:47:46+00:00 app[web.1]:   Rendered layouts/_header.html.erb (59.5ms)
  2012-10-29T16:47:46+00:00 app[web.1]: :             SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
  2012-10-29T16:47:46+00:00 app[web.1]: 
  2012-10-29T16:47:46+00:00 app[web.1]: Completed 500 Internal Server Error in 144ms
  2012-10-29T16:47:46+00:00 app[web.1]: LINE 4:              WHERE a.attrelid = '"users"'::regclass
  2012-10-29T16:47:46+00:00 app[web.1]:              ORDER BY a.attnum
  2012-10-29T16:47:46+00:00 app[web.1]:     1: 
  2012-10-29T16:47:46+00:00 app[web.1]:     2:        &lt;nav class="clearfix"&gt;
  2012-10-29T16:47:46+00:00 app[web.1]:     3:            &lt;% if !signed_in? %&gt;
  2012-10-29T16:47:46+00:00 app[web.1]:     4:                &lt;%= link_to "home", root_url %&gt;
  2012-10-29T16:47:46+00:00 app[web.1]: ):
  2012-10-29T16:47:46+00:00 app[web.1]:     6:                &lt;%= link_to "my profile", current_user %&gt;
  2012-10-29T16:47:46+00:00 app[web.1]:     5:            &lt;% else %&gt;
  2012-10-29T16:47:46+00:00 app[web.1]:   app/helpers/sessions_helper.rb:26:in `current_user'
  2012-10-29T16:47:46+00:00 app[web.1]: 
  2012-10-29T16:47:46+00:00 app[web.1]:   app/helpers/sessions_helper.rb:13:in `signed_in?'
  2012-10-29T16:47:46+00:00 app[web.1]:   app/views/layouts/_header.html.erb:3:in `_app_views_layouts__header_html_erb__1629561108313014440_42800200'
  2012-10-29T16:47:46+00:00 app[web.1]:   app/views/layouts/application.html.erb:13:in `_app_views_layouts_application_html_erb__2023541485350786357_43765980'
  2012-10-29T16:47:46+00:00 app[web.1]: 
  2012-10-29T16:47:46+00:00 heroku[router]: GET pacific-ravine-3563.herokuapp.com/favicon.ico dyno=web.1 queue=0 wait=1ms service=12ms status=200 bytes=1150
  2012-10-29T17:04:22+00:00 heroku[slugc]: Slug compilation started
  2012-10-29T17:04:41+00:00 heroku[slugc]: Slug compilation finished
  2012-10-29T17:04:41+00:00 heroku[web.1]: State changed from up to starting
  2012-10-29T17:04:43+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 38347`
  2012-10-29T17:04:44+00:00 heroku[web.1]: Stopping all processes with SIGTERM
  2012-10-29T17:04:44+00:00 app[web.1]: [2012-10-29 17:04:44] ERROR SignalException: SIGTERM
  2012-10-29T17:04:44+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/server.rb:90:in `select'
  2012-10-29T17:04:50+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-has-been-released. (called from &lt;top (required)&gt; at /app/config/environment.rb:5)
  2012-10-29T17:04:50+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-has-been-released. (called from &lt;top (required)&gt; at /app/config/environment.rb:5)
  2012-10-29T17:04:50+00:00 heroku[web.1]: Stopping all processes with SIGTERM
  2012-10-29T17:04:51+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/server.rb:90:in `select'
  2012-10-29T17:04:51+00:00 app[web.1]: [2012-10-29 17:04:51] ERROR SignalException: SIGTERM
  2012-10-29T17:04:55+00:00 app[web.1]: =&gt; Booting WEBrick
  2012-10-29T17:04:55+00:00 app[web.1]: =&gt; Rails 3.2.8 application starting in production on http://0.0.0.0:38347
  2012-10-29T17:04:55+00:00 app[web.1]: =&gt; Call with -d to detach
  2012-10-29T17:04:55+00:00 app[web.1]: =&gt; Ctrl-C to shutdown server
  2012-10-29T17:04:55+00:00 app[web.1]: Connecting to database specified by DATABASE_URL
  2012-10-29T17:04:55+00:00 heroku[web.1]: Error R12 (Exit timeout) -&gt; At least one process failed to exit within 10 seconds of SIGTERM
  2012-10-29T17:04:55+00:00 heroku[web.1]: Stopping remaining processes with SIGKILL
  2012-10-29T17:04:55+00:00 app[web.1]: [2012-10-29 17:04:55] INFO  WEBrick 1.3.1
  2012-10-29T17:04:55+00:00 app[web.1]: [2012-10-29 17:04:55] INFO  ruby 1.9.2 (2011-07-09) [x86_64-linux]
  2012-10-29T17:04:55+00:00 app[web.1]: [2012-10-29 17:04:55] INFO  WEBrick::HTTPServer#start: pid=2 port=38347
  2012-10-29T17:04:56+00:00 heroku[web.1]: State changed from starting to up
  2012-10-29T17:04:57+00:00 heroku[web.1]: Process exited with status 137
  </code></pre>
  
  <p>schema</p>
  
  <pre><code>ActiveRecord::Schema.define(:version =&gt; 20121024185036) do
  
  create_table "albums", :force =&gt; true do |t|
    t.string   "name"
    t.datetime "created_at",  :null =&gt; false
    t.datetime "updated_at",  :null =&gt; false
    t.string   "description"
    t.string   "status"
  end
  
  create_table "friendships", :force =&gt; true do |t|
    t.integer  "user_id"
    t.integer  "friend_id"
    t.datetime "created_at", :null =&gt; false
    t.datetime "updated_at", :null =&gt; false
    t.string   "status"
  end
  
  create_table "ownerships", :id =&gt; false, :force =&gt; true do |t|
    t.integer "album_id"
    t.integer "user_id"
    t.string  "status"
  end
  
  create_table "photos", :force =&gt; true do |t|
    t.string   "avatar_file_name"
    t.string   "avatar_content_type"
    t.integer  "avatar_file_size"
    t.datetime "avatar_updated_at"
    t.datetime "created_at",          :null =&gt; false
    t.datetime "updated_at",          :null =&gt; false
    t.integer  "album_id"
  end
  
  create_table "users", :force =&gt; true do |t|
    t.string   "name"
    t.string   "email"
    t.datetime "created_at",              :null =&gt; false
    t.datetime "updated_at",              :null =&gt; false
    t.string   "password_digest"
    t.string   "remember_token"
    t.string   "profilepic_file_name"
    t.string   "profilepic_content_type"
    t.integer  "profilepic_file_size"
    t.datetime "profilepic_updated_at"
    t.string   "password_reset_token"
  end
  
  add_index "users", ["remember_token"], :name =&gt; "index_users_on_remember_token"
  </code></pre>
  
  <p>end</p>
  
  <p>heroku and local db:version</p>
  
  <pre><code>Edmunds-MacBook-Pro:pholder edmundmai$ heroku run rake db:version
  Running `rake db:version` attached to terminal... up, run.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-has-been-released. (called from &lt;top (required)&gt; at /app/Rakefile:7)
  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-has-been-released. (called from &lt;top (required)&gt; at /app/Rakefile:7)
  Connecting to database specified by DATABASE_URL
  Current version: 20120929230317
  Edmunds-MacBook-Pro:pholder edmundmai$ rake db:version
  Current version: 20121024185036
  </code></pre>