Heroku status 500 error after deploying Rails app - ruby-on-rails

$heroku logs --tail
Started GET "/" for 46.188.182.234 at 2016-11-14 20:51:53 +0000
2016-11-14T20:51:53.840163+00:00 app[web.1]: [21c27115-512c-4e9e-bb24-8e1d8b0a46ca] Processing by StaticPagesController#home as HTML
2016-11-14T20:51:53.850654+00:00 app[web.1]: [21c27115-512c-4e9e-bb24-8e1d8b0a46ca] Rendering static_pages/home.html.erb within layouts/application
2016-11-14T20:51:53.856619+00:00 app[web.1]: [21c27115-512c-4e9e-bb24-8e1d8b0a46ca] Rendered static_pages/home.html.erb within layouts/application (5.7ms)
2016-11-14T20:51:53.859704+00:00 app[web.1]: [21c27115-512c-4e9e-bb24-8e1d8b0a46ca] Completed 200 OK in 19ms (Views: 11.1ms | ActiveRecord: 0.0ms)
2016-11-14T20:51:59.479887+00:00 heroku[router]: at=info method=GET path="/signup" host=damp-reef-30485.herokuapp.com request_id=79382bce-34fd-4faa-958c-15b6ce8adf1f fwd="46.188.182.234" dyno=web.1 connect=1ms service=64ms status=500 bytes=1733
2016-11-14T20:51:59.487241+00:00 app[web.1]: [79382bce-34fd-4faa-958c-15b6ce8adf1f] Started GET "/signup" for 46.188.182.234 at 2016-11-14 20:51:59 +0000
2016-11-14T20:51:59.495254+00:00 app[web.1]: [79382bce-34fd-4faa-958c-15b6ce8adf1f] Processing by UsersController#new as HTML
2016-11-14T20:51:59.509968+00:00 app[web.1]: [79382bce-34fd-4faa-958c-15b6ce8adf1f] Completed 500 Internal Server Error in 14ms (ActiveRecord: 1.6ms)
2016-11-14T20:51:59.511411+00:00 app[web.1]: [79382bce-34fd-4faa-958c-15b6ce8adf1f]
2016-11-14T20:51:59.511456+00:00 app[web.1]: [79382bce-34fd-4faa-958c-15b6ce8adf1f] ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "users" does not exist
2016-11-14T20:51:59.511457+00:00 app[web.1]: LINE 8: WHERE a.attrelid = '"users"'::regclass
2016-11-14T20:51:59.511457+00:00 app[web.1]: ^
2016-11-14T20:51:59.511458+00:00 app[web.1]: : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
2016-11-14T20:51:59.511458+00:00 app[web.1]: pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
2016-11-14T20:51:59.511459+00:00 app[web.1]: (SELECT c.collname FROM pg_collation c, pg_type t
2016-11-14T20:51:59.511459+00:00 app[web.1]: WHERE c.oid = a.attcollation AND t.oid = a.atttypid AND a.attcollation <> t.typcollation),
2016-11-14T20:51:59.511460+00:00 app[web.1]: col_description(a.attrelid, a.attnum) AS comment
2016-11-14T20:51:59.511460+00:00 app[web.1]: FROM pg_attribute a LEFT JOIN pg_attrdef d
2016-11-14T20:51:59.511461+00:00 app[web.1]: ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2016-11-14T20:51:59.511461+00:00 app[web.1]: WHERE a.attrelid = '"users"'::regclass
2016-11-14T20:51:59.511462+00:00 app[web.1]: AND a.attnum > 0 AND NOT a.attisdropped
2016-11-14T20:51:59.511462+00:00 app[web.1]: ORDER BY a.attnum
2016-11-14T20:51:59.511463+00:00 app[web.1]: ):
2016-11-14T20:51:59.511491+00:00 app[web.1]: [79382bce-34fd-4faa-958c-15b6ce8adf1f]
2016-11-14T20:51:59.511536+00:00 app[web.1]: [79382bce-34fd-4faa-958c-15b6ce8adf1f] app/controllers/users_controller.rb:17:in `new'
As you can see I get the home page but when I try to get signup form I got error. Everything is working ok locally, REST actions on users resource are working fine locally.
This output is interesting for me:
"PG::UndefinedTable: ERROR: relation "users" does not exist"
Please help, thanks.

You need to run migrations on Heroku, just run in the shell inside your project:
heroku run rails db:migrate

**This Issue was appeared because of some migration issue.To up migrations in heroku enter below command **
heroku run rake db:migrate
After this,check whether all migrations are up or not.If you get any issue check with that migration.

Related

Connecting Postgresql to Rails in Heroku

So I recently deployed my Rails backend server to Heroku.
After a little struggling with passing from SQLite to PostgreSQL, I finally got everything running.
Now the problem is, I did rake db:create and rake db:migrate and that went without any errors but now when I make a REST call to the server I have this error (complete) :
2019-07-31T19:42:16.534355+00:00 app[web.1]: I, [2019-07-31T19:42:16.534259 #4] INFO -- : [047c870d-8791-4ec7-90df-a7998b8b17c5] Started POST "/sessions" for 91.176.204.35 at 2019-07-31 19:42:16 +0000
2019-07-31T19:42:16.535824+00:00 app[web.1]: I, [2019-07-31T19:42:16.535063 #4] INFO -- : [047c870d-8791-4ec7-90df-a7998b8b17c5] Processing by SessionsController#create as */*
2019-07-31T19:42:16.535947+00:00 app[web.1]: I, [2019-07-31T19:42:16.535882 #4] INFO -- : [047c870d-8791-4ec7-90df-a7998b8b17c5] Parameters: {"email"=>"titivermeesch#gmail.com", "password"=>"[FILTERED]"}
2019-07-31T19:42:16.566455+00:00 app[web.1]: I, [2019-07-31T19:42:16.566340 #4] INFO -- : [047c870d-8791-4ec7-90df-a7998b8b17c5] Completed 500 Internal Server Error in 30ms (ActiveRecord: 11.2ms)
2019-07-31T19:42:16.567845+00:00 app[web.1]: F, [2019-07-31T19:42:16.567772 #4] FATAL -- : [047c870d-8791-4ec7-90df-a7998b8b17c5]
2019-07-31T19:42:16.567954+00:00 app[web.1]: F, [2019-07-31T19:42:16.567879 #4] FATAL -- : [047c870d-8791-4ec7-90df-a7998b8b17c5] ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "users" does not exist
2019-07-31T19:42:16.567957+00:00 app[web.1]: LINE 8: WHERE a.attrelid = '"users"'::regclass
2019-07-31T19:42:16.567959+00:00 app[web.1]: ^
2019-07-31T19:42:16.567961+00:00 app[web.1]: : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
2019-07-31T19:42:16.567962+00:00 app[web.1]: pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
2019-07-31T19:42:16.567964+00:00 app[web.1]: c.collname, col_description(a.attrelid, a.attnum) AS comment
2019-07-31T19:42:16.567965+00:00 app[web.1]: FROM pg_attribute a
2019-07-31T19:42:16.567966+00:00 app[web.1]: LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2019-07-31T19:42:16.567968+00:00 app[web.1]: LEFT JOIN pg_type t ON a.atttypid = t.oid
2019-07-31T19:42:16.567969+00:00 app[web.1]: LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
2019-07-31T19:42:16.567971+00:00 app[web.1]: WHERE a.attrelid = '"users"'::regclass
2019-07-31T19:42:16.567972+00:00 app[web.1]: AND a.attnum > 0 AND NOT a.attisdropped
2019-07-31T19:42:16.567973+00:00 app[web.1]: ORDER BY a.attnum
2019-07-31T19:42:16.567975+00:00 app[web.1]: ):
2019-07-31T19:42:16.568064+00:00 app[web.1]: F, [2019-07-31T19:42:16.568002 #4] FATAL -- : [047c870d-8791-4ec7-90df-a7998b8b17c5]
2019-07-31T19:42:16.568171+00:00 app[web.1]: F, [2019-07-31T19:42:16.568104 #4] FATAL -- : [047c870d-8791-4ec7-90df-a7998b8b17c5] app/controllers/sessions_controller.rb:5:in `create'
I have a PostgreSQL add-on installed and it is running. (Otherwise the Rails server wouldn't even boot).
So why do I get this kind of errors on each request? I checked in console and if I do something like User.all I get this :
ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "users" does not exist)
LINE 1: SELECT "users".* FROM "users" LIMIT $1
^
: SELECT "users".* FROM "users" LIMIT $1
This gets me so confused, what did I do wrong?
It sounds like you may have run rake db:migrate locally and not on Heroku. As a result, when you use the Heroku CLI, it doesn't recognize the users table because it doesn't yet exist.
I believe if you use have the pg gem in your Gemfile, Heroku's system will automatically setup a database for you. It's been a while since I've created a Heroku instance so don't quote me on that.
If you're unsure if you have PostgreSQL with your app, check the app's service add-ons area. Heroku also has more documentation on using PostgreSQL on their platform. It may be a good idea for you to reference their documentation for getting started with Rails as well.
Once you have your PostgreSQL database setup to work with your app, you use the Heroku CLI to migrate the database and create your users table:
heroku rake db:migrate

Can't get resources to work on rails on Heroku

I'm a rails newbie having trouble getting resources to work on rails when deployed on Heroku. It works in my development environment (Cloud9), but not on Heroku. My routes.rb is as follows:
Rails.application.routes.draw do
root 'pages#home'
get '/home', to: 'pages#home'
resources :characters
end
When I run it on Cloud9, it works as it should and rake routes returns:
Prefix Verb URI Pattern Controller#Action
root GET / pages#home
home GET /home(.:format) pages#home
GET /home(.:format) pages#home
characters GET /characters(.:format) characters#index
POST /characters(.:format) characters#create
new_character GET /characters/new(.:format) characters#new
edit_character GET /characters/:id/edit(.:format) characters#edit
character GET /characters/:id(.:format) characters#show
PATCH /characters/:id(.:format) characters#update
PUT /characters/:id(.:format) characters#update
DELETE /characters/:id(.:format) characters#destroy
but on Heroku, I get an error message saying We're sorry, but something went wrong. If you are the application owner check the logs for more information. and the logs show me this:
2018-01-10T21:58:43.431137+00:00 app[web.1]: Completed 500 Internal Server Error in 6ms (ActiveRecord: 4.1ms)
2018-01-10T21:58:43.433165+00:00 app[web.1]: FROM pg_attribute a LEFT JOIN pg_attrdef d
2018-01-10T21:58:43.433157+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "characters" does not exist
2018-01-10T21:58:43.433168+00:00 app[web.1]: WHERE a.attrelid = '"characters"'::regclass
2018-01-10T21:58:43.433154+00:00 app[web.1]:
2018-01-10T21:58:43.433166+00:00 app[web.1]: ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2018-01-10T21:58:43.433159+00:00 app[web.1]: ^
2018-01-10T21:58:43.433174+00:00 app[web.1]:
2018-01-10T21:58:43.433169+00:00 app[web.1]: ORDER BY a.attnum
2018-01-10T21:58:43.425295+00:00 app[web.1]: Processing by CharactersController#new as HTML
2018-01-10T21:58:43.433172+00:00 app[web.1]: app/controllers/characters_controller.rb:7:in `new'
2018-01-10T21:58:43.433158+00:00 app[web.1]: LINE 5: WHERE a.attrelid = '"characters"'::regclass
2018-01-10T21:58:43.433170+00:00 app[web.1]: ):
2018-01-10T21:58:43.422364+00:00 app[web.1]: Started GET "/characters/new" for 24.155.28.170 at 2018-01-10 21:58:43 +0000
2018-01-10T21:58:43.433168+00:00 app[web.1]: AND a.attnum > 0 AND NOT a.attisdropped
2018-01-10T21:58:43.433161+00:00 app[web.1]: : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
2018-01-10T21:58:43.433164+00:00 app[web.1]: pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
2018-01-10T21:58:43.433173+00:00 app[web.1]:
2018-01-10T21:58:58.637394+00:00 app[web.1]: pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
2018-01-10T21:58:58.637395+00:00 app[web.1]: FROM pg_attribute a LEFT JOIN pg_attrdef d
2018-01-10T21:58:58.626386+00:00 app[web.1]: Started GET "/characters/new" for 24.155.28.170 at 2018-01-10 21:58:58 +0000
2018-01-10T21:58:58.637397+00:00 app[web.1]: WHERE a.attrelid = '"characters"'::regclass
2018-01-10T21:58:58.637402+00:00 app[web.1]:
2018-01-10T21:58:58.637392+00:00 app[web.1]: : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
2018-01-10T21:58:58.637389+00:00 app[web.1]: LINE 5: WHERE a.attrelid = '"characters"'::regclass
2018-01-10T21:58:58.637400+00:00 app[web.1]: ):
2018-01-10T21:58:58.637401+00:00 app[web.1]: app/controllers/characters_controller.rb:7:in `new'
2018-01-10T21:58:58.635689+00:00 app[web.1]: Completed 500 Internal Server Error in 6ms (ActiveRecord: 4.0ms)
2018-01-10T21:58:58.637399+00:00 app[web.1]: ORDER BY a.attnum
2018-01-10T21:58:58.637385+00:00 app[web.1]:
2018-01-10T21:58:58.637391+00:00 app[web.1]: ^
2018-01-10T21:58:58.637396+00:00 app[web.1]: ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2018-01-10T21:58:58.637398+00:00 app[web.1]: AND a.attnum > 0 AND NOT a.attisdropped
2018-01-10T21:58:58.629873+00:00 app[web.1]: Processing by CharactersController#new as HTML
2018-01-10T21:58:58.637388+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "characters" does not exist
2018-01-10T21:58:58.637403+00:00 app[web.1]:
What's wrong and how do I fix it?
Assuming you haven't done anything absolutely with where you're putting your mdoels, ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "characters" does not exist is indicative of not having the table inside of PostgreSQL.
heroku run rake db:migrate should do the trick.

Need help in understanding Heroku logs

I have an rails 5 app which works perfectly in my local machine with PostgreSQL locally installed.
I pushed my app to heroku and the login page of the app appears correctly. But when I try to login to the app I get an error. Checking the logs give following output.
2016-10-26T04:21:48.515201+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=teamwallet.herokuapp.com request_id=94268ad1-1f86-4caf-80ae-61799fdddc5b fwd="182.57.131.204" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2016-10-26T04:21:54.410775+00:00 heroku[router]: at=info method=POST path="/" host=teamwallet.herokuapp.com request_id=52da63d5-afbd-4e8d-9d8a-51b04d077a21 fwd="182.57.131.204" dyno=web.1 connect=0ms service=7ms status=500 bytes=1669
2016-10-26T04:21:54.435325+00:00 app[web.1]: I, [2016-10-26T04:21:54.435257 #3] INFO -- : [52da63d5-afbd-4e8d-9d8a-51b04d077a21] Started POST "/" for 182.57.131.204 at 2016-10-26 04:21:54 +0000
2016-10-26T04:21:54.435994+00:00 app[web.1]: I, [2016-10-26T04:21:54.435933 #3] INFO -- : [52da63d5-afbd-4e8d-9d8a-51b04d077a21] Processing by SessionsController#login_attempt as HTML
2016-10-26T04:21:54.436093+00:00 app[web.1]: I, [2016-10-26T04:21:54.436045 #3] INFO -- : [52da63d5-afbd-4e8d-9d8a-51b04d077a21] Parameters: {"utf8"=>"✓", "authenticity_token"=>"xEvOCcjU8FZyt2OlypuNIifhucXsveX6TOGIXwkpddO7Dt9cEQyJrS/5Kw+trW35eo/jtv+A2IkuIzYHJUt4tQ==", "username_or_email"=>"admin", "login_password"=>"[FILTERED]", "commit"=>"Log In"}
2016-10-26T04:21:54.438633+00:00 app[web.1]: I, [2016-10-26T04:21:54.438587 #3] INFO -- : [52da63d5-afbd-4e8d-9d8a-51b04d077a21] Completed 500 Internal Server Error in 2ms (ActiveRecord: 1.7ms)
2016-10-26T04:21:54.439261+00:00 app[web.1]: F, [2016-10-26T04:21:54.439180 #3] FATAL -- : [52da63d5-afbd-4e8d-9d8a-51b04d077a21]
2016-10-26T04:21:54.439305+00:00 app[web.1]: F, [2016-10-26T04:21:54.439242 #3] FATAL -- : [52da63d5-afbd-4e8d-9d8a-51b04d077a21] ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "users" does not exist
2016-10-26T04:21:54.439306+00:00 app[web.1]: LINE 8: WHERE a.attrelid = '"users"'::regclass
2016-10-26T04:21:54.439307+00:00 app[web.1]: ^
2016-10-26T04:21:54.439308+00:00 app[web.1]: : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
2016-10-26T04:21:54.439309+00:00 app[web.1]: pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
2016-10-26T04:21:54.439310+00:00 app[web.1]: (SELECT c.collname FROM pg_collation c, pg_type t
2016-10-26T04:21:54.439311+00:00 app[web.1]: WHERE c.oid = a.attcollation AND t.oid = a.atttypid AND a.attcollation <> t.typcollation),
2016-10-26T04:21:54.439311+00:00 app[web.1]: col_description(a.attrelid, a.attnum) AS comment
2016-10-26T04:21:54.439312+00:00 app[web.1]: FROM pg_attribute a LEFT JOIN pg_attrdef d
2016-10-26T04:21:54.439313+00:00 app[web.1]: ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2016-10-26T04:21:54.439313+00:00 app[web.1]: WHERE a.attrelid = '"users"'::regclass
2016-10-26T04:21:54.439314+00:00 app[web.1]: AND a.attnum > 0 AND NOT a.attisdropped
2016-10-26T04:21:54.439315+00:00 app[web.1]: ORDER BY a.attnum
2016-10-26T04:21:54.439316+00:00 app[web.1]: ):
2016-10-26T04:21:54.439363+00:00 app[web.1]: F, [2016-10-26T04:21:54.439302 #3] FATAL -- : [52da63d5-afbd-4e8d-9d8a-51b04d077a21]
2016-10-26T04:21:54.439411+00:00 app[web.1]: F, [2016-10-26T04:21:54.439359 #3] FATAL -- : [52da63d5-afbd-4e8d-9d8a-51b04d077a21] app/models/user.rb:23:in `authenticate'
2016-10-26T04:21:54.439458+00:00 app[web.1]: F, [2016-10-26T04:21:54.439406 #3] FATAL -- : [52da63d5-afbd-4e8d-9d8a-51b04d077a21] app/controllers/sessions_controller.rb:11:in `login_attempt'
Your error says this:
ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "users" does not exist
it's really easy to forget, but Heroku doesn't automatically run migrations.
From the heroku docs https://devcenter.heroku.com/articles/rake
# shell
heroku run rake db:migrate
heroku restart
ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "users" does not exist
You forgot to run the migrations on heroku. Run this command on your console
heroku run rake db:migrate

Too many database connections created in rails 2.3.18 application

We have many models like the below one.
class User < ActiveRecord::Base
create_connection
def create_connection
# we have used this ActiveRecord::Base.configurations[current_environment] for connection_info
self.establish_connection connection_info
end
end
After using many models of similar types, many database connections are being created for the remote database. So we are getting the below error message for remote Postgres database.
2013-12-04T12:18:28.360740+00:00 app[web.1]: FATAL: too many connections for role "ycjcwpowlrmvhi"
Actually we have two applications on heroku and each application accesses the other's database.
How we can close these many database connection after executing the query?
We are also getting the below error some times.
2013-12-06T09:36:27.952787+00:00 app[web.1]: Processing StaffController#index (for 202.45.6.95 at 2013-12-06 09:36:27) [GET]
2013-12-06T09:36:16.453533+00:00 heroku[router]: at=info method=GET path=/javascripts/application.js?1386322453 host=demomanager.herokuapp.com fwd="202.45.6.95" dyno=web.1 connect=1ms service=3ms status=200 bytes=5025
2013-12-06T09:36:32.935950+00:00 app[web.1]:
2013-12-06T09:36:32.935950+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::UnableToSend: SSL error: decryption failed or bad record mac
2013-12-06T09:36:32.935950+00:00 app[web.1]: : SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
2013-12-06T09:36:32.935950+00:00 app[web.1]: FROM pg_attribute a LEFT JOIN pg_attrdef d
2013-12-06T09:36:32.935950+00:00 app[web.1]: ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2013-12-06T09:36:32.935950+00:00 app[web.1]: WHERE a.attrelid = '"tags"'::regclass
2013-12-06T09:36:32.935950+00:00 app[web.1]: AND a.attnum > 0 AND NOT a.attisdropped
2013-12-06T09:36:32.935950+00:00 app[web.1]: ORDER BY a.attnum
2013-12-06T09:36:32.935950+00:00 app[web.1]: ):
You should be able to change the number of database connections by changing the pool parameter in your database.yml and lowering that value.

we're sorry, but something went wrong on heroku when a user tries signing up [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 9 years ago.
I can't correctly pinpoint what exactly is causing the issue
This is a new website I just pushed to heroku, ran heroku rake db:migrate, and heroku restart
It works just fine locally but this happens in production
Here's the relevant portion of heroku logs
2013-05-03T23:16:27.189569+00:00 app[web.1]:
2013-05-03T23:16:27.189569+00:00 app[web.1]: Started GET "/signup" for xx.xx.xx.
xxx at 2013-05-03 23:16:27 +0000
2013-05-03T23:16:27.253381+00:00 app[web.1]: Rendered shared/_error_messages.h
tml.erb (0.4ms)
2013-05-03T23:16:27.253381+00:00 app[web.1]: Rendered layouts/_shim.html.erb (
0.0ms)
2013-05-03T23:16:27.253381+00:00 app[web.1]: Rendered layouts/_header.html.erb
(2.9ms)
2013-05-03T23:16:27.253381+00:00 app[web.1]: Processing by UsersController#new a
s HTML
2013-05-03T23:16:27.253381+00:00 app[web.1]: Rendered users/new.html.erb withi
n layouts/application (43.8ms)
2013-05-03T23:16:27.253381+00:00 app[web.1]: Completed 200 OK in 60ms (Views: 48
.4ms | ActiveRecord: 1.6ms | Solr: 0.0ms)
2013-05-03T23:16:27.922135+00:00 heroku[router]: at=info method=GET path=/favico
n.ico host= sleepy-river-xxxx.herokuapp.com fwd="xx.xx.xx.xxx" dyno=web.1 connect
=1ms service=4ms status=304 bytes=0
2013-05-03T23:16:27.268937+00:00 heroku[router]: at=info method=GET path=/signup
host= sleepy-river-xxxx.herokuapp.com fwd="xx.xx.xx.xxx" dyno=web.1 connect=6ms
service=81ms status=304 bytes=0
2013-05-03T23:16:47.934099+00:00 app[web.1]:
2013-05-03T23:16:47.934099+00:00 app[web.1]:
2013-05-03T23:16:47.934099+00:00 app[web.1]: Started POST "/users" for xx.xx.xx.
xxx at 2013-05-03 23:16:47 +0000
2013-05-03T23:16:48.248989+00:00 app[web.1]: Redirected to http://sleepy-river-xxxx.herokuapp.com/home
2013-05-03T23:16:48.248989+00:00 app[web.1]: Parameters: {"utf8"=>"???", "auth
enticity_token"=>"m+NCbnqHJk81yWgyY+Y709mQZ0N04MpW8MLGLXjbleA=", "user"=>{"name"
=>"testuser", "email"=>"testuser#email.com", "password"=>"[FILTERED]", "passwo
rd_confirmation"=>"[FILTERED]"}, "commit"=>"Create my account"}
2013-05-03T23:16:48.248989+00:00 app[web.1]: Completed 302 Found in 311ms (Activ
eRecord: 70.6ms)
2013-05-03T23:16:48.248989+00:00 app[web.1]: Processing by UsersController#creat
e as HTML
2013-05-03T23:16:48.435265+00:00 app[web.1]:
2013-05-03T23:16:48.435265+00:00 app[web.1]:
2013-05-03T23:16:48.435265+00:00 app[web.1]: Started GET "/home" for 75.82.32.16
4 at 2013-05-03 23:16:48 +0000
2013-05-03T23:16:48.649331+00:00 app[web.1]: FROM pg_attribute a L
EFT JOIN pg_attrdef d
2013-05-03T23:16:48.649331+00:00 app[web.1]: WHERE a.attrelid = '"h
ashtags"'::regclass
2013-05-03T23:16:48.649331+00:00 app[web.1]: LINE 4: WHERE a.attrel
id = '"hashtags"'::regclass
2013-05-03T23:16:48.649331+00:00 app[web.1]: ON a.attrelid = d.a
drelid AND a.attnum = d.adnum
2013-05-03T23:16:48.649617+00:00 app[web.1]: 23: <%= link_to "#"+h.hashtag
s, "#" %><br>
2013-05-03T23:16:48.649617+00:00 app[web.1]: 25:
2013-05-03T23:16:48.649845+00:00 app[web.1]: Rendered shared/_user_info.html.e
rb (4.4ms)
2013-05-03T23:16:48.649331+00:00 app[web.1]: ActionView::Template::Error (PGErro
r: ERROR: relation "hashtags" does not exist
2013-05-03T23:16:48.649617+00:00 app[web.1]: 22: <% #htags.each do |h| %>
2013-05-03T23:16:48.649617+00:00 app[web.1]:
2013-05-03T23:16:48.649845+00:00 app[web.1]: Processing by StaticPagesController
#home as HTML
2013-05-03T23:16:48.649331+00:00 app[web.1]:
2013-05-03T23:16:48.649331+00:00 app[web.1]:
^
2013-05-03T23:16:48.649331+00:00 app[web.1]: : SELECT a.attname, for
mat_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
2013-05-03T23:16:48.649617+00:00 app[web.1]: app/views/static_pages/home.html.
erb:22:in `_app_views_static_pages_home_html_erb___3097102804728997358_70437520'
2013-05-03T23:16:48.649845+00:00 app[web.1]:
2013-05-03T23:16:48.649331+00:00 app[web.1]: AND a.attnum > 0 AND
NOT a.attisdropped
2013-05-03T23:16:48.649331+00:00 app[web.1]: ORDER BY a.attnum
2013-05-03T23:16:48.649617+00:00 app[web.1]: 19: <div class="box">
2013-05-03T23:16:48.649617+00:00 app[web.1]: 24: <% end %>
2013-05-03T23:16:48.649617+00:00 app[web.1]: ):
2013-05-03T23:16:48.649617+00:00 app[web.1]: 20: Tagged Posts
2013-05-03T23:16:48.649617+00:00 app[web.1]: 21: <br>
2013-05-03T23:16:48.649845+00:00 app[web.1]: Rendered shared/_stats.html.erb (
38.9ms)
2013-05-03T23:16:48.649845+00:00 app[web.1]: Completed 500 Internal Server Error
in 209ms
2013-05-03T23:16:48.649845+00:00 app[web.1]: Rendered static_pages/home.html.e
rb within layouts/application (156.1ms)
2013-05-03T23:16:48.654562+00:00 heroku[router]: at=info method=GET path=/home h
ost=sleepy-river-xxxx.herokuapp.com fwd="xx.xx.xx.xxx" dyno=web.1 connect=1ms se
rvice=219ms status=500 bytes=643
2013-05-03T23:16:48.253053+00:00 heroku[router]: at=info method=POST path=/users
host= sleepy-river-xxxx.herokuapp.com fwd="xx.xx.xx.xxx" dyno=web.1 connect=3ms
service=395ms status=302 bytes=109
Something is wrong with the template that is loaded after a user signs up. Try it locally, I bet you'll find the answer you need.
Added hint:
Look at the line Relation HashTags does not exist. That holds the key to your problem.
I bet if you run
heroku run rake db:setup
and
heroku run rake db:migrate
Your problem will be solved

Resources