Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Build a Simple Ruby on Rails Application Deploying Deploying Treebook to Heroku

Javier Nunez
Javier Nunez
7,529 Points

Heroku install = "We're sorry, but something went wrong."

after finally getting the progresql to work and push it to heroku master, I open up the url and I get just a basic white page with links, no css at all. none of the links work. I check my logs, and I have no idea how to read them properly but here they are. I am really lost here.

2014-07-15T01:54:42.457789+00:00 app[web.1]:                                           ^
2014-07-15T01:54:42.457814+00:00 app[web.1]: 
2014-07-15T01:54:42.457829+00:00 app[web.1]:                   ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2014-07-15T01:54:42.457843+00:00 app[web.1]: :               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
2014-07-15T01:54:42.457851+00:00 app[web.1]:                ORDER BY a.attnum
2014-07-15T01:54:42.457867+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:430:in `log'
2014-07-15T01:54:42.457878+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/model_schema.rb:208:in `columns'
2014-07-15T01:54:42.457888+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
2014-07-15T01:54:42.457976+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_controller/metal/rescue.rb:29:in `process_action'
2014-07-15T01:54:42.457986+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
2014-07-15T01:54:42.458005+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/journey/router.rb:71:in `block in call'
2014-07-15T01:54:42.458024+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call'
2014-07-15T01:54:42.458034+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/cookies.rb:486:in `call'
2014-07-15T01:54:42.458062+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
2014-07-15T01:54:42.458073+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/rack/logger.rb:20:in `call'
2014-07-15T01:54:42.458091+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
2014-07-15T01:54:42.457741+00:00 app[web.1]: I, [2014-07-15T01:54:38.772085 #2]  INFO -- : Processing by ProfilesController#show as 
2014-07-15T01:54:42.457778+00:00 app[web.1]:                  AND a.attnum > 0 AND NOT a.attisdropped
2014-07-15T01:54:42.457803+00:00 app[web.1]:                 FROM pg_attribute a LEFT JOIN pg_attrdef d
2014-07-15T01:54:42.457818+00:00 app[web.1]: I, [2014-07-15T01:54:42.449506 #2]  INFO -- : Processing by Devise::SessionsController#new as HTML
2014-07-15T01:54:42.457833+00:00 app[web.1]:                ORDER BY a.attnum
2014-07-15T01:54:42.457855+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:774:in `exec_no_cache'
2014-07-15T01:54:42.457872+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql/schema_statements.rb:174:in `columns'
2014-07-15T01:54:42.457882+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/core.rb:171:in `initialize'
2014-07-15T01:54:42.457957+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
2014-07-15T01:54:42.457980+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
2014-07-15T01:54:42.457990+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_controller/metal.rb:195:in `dispatch'
2014-07-15T01:54:42.458018+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:680:in `call'
2014-07-15T01:54:42.458028+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
2014-07-15T01:54:42.458038+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
2014-07-15T01:54:42.458066+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/rack/logger.rb:38:in `call_app'
2014-07-15T01:54:42.458076+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
2014-07-15T01:54:42.458094+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2014-07-15T01:54:42.457746+00:00 app[web.1]: LINE 5:                WHERE a.attrelid = '"users"'::regclass
2014-07-15T01:54:42.457783+00:00 app[web.1]: I, [2014-07-15T01:54:38.777830 #2]  INFO -- : Completed 500 Internal Server Error in 5ms
2014-07-15T01:54:42.457809+00:00 app[web.1]:                ORDER BY a.attnum
2014-07-15T01:54:42.457825+00:00 app[web.1]: :               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
2014-07-15T01:54:42.457839+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR:  relation "users" does not exist
2014-07-15T01:54:42.458000+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
2014-07-15T01:54:42.458082+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:511:in `call'
2014-07-15T01:54:42.457771+00:00 app[web.1]:                      pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
2014-07-15T01:54:42.457787+00:00 app[web.1]: LINE 5:                WHERE a.attrelid = '"users"'::regclass
2014-07-15T01:54:42.457812+00:00 app[web.1]:   app/controllers/profiles_controller.rb:3:in `show'
2014-07-15T01:54:42.457827+00:00 app[web.1]:                 FROM pg_attribute a LEFT JOIN pg_attrdef d
2014-07-15T01:54:42.457841+00:00 app[web.1]:                                           ^
2014-07-15T01:54:42.457849+00:00 app[web.1]:                  AND a.attnum > 0 AND NOT a.attisdropped
2014-07-15T01:54:42.457860+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
2014-07-15T01:54:42.457876+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/schema_cache.rb:56:in `columns'
2014-07-15T01:54:42.457886+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/app/controllers/devise/sessions_controller.rb:8:in `new'
2014-07-15T01:54:42.457975+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/abstract_controller/callbacks.rb:17:in `process_action'
2014-07-15T01:54:42.457984+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
2014-07-15T01:54:42.458003+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:44:in `call'
2014-07-15T01:54:42.458022+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `call'
2014-07-15T01:54:42.458033+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'
2014-07-15T01:54:42.458061+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2014-07-15T01:54:42.458072+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/tagged_logging.rb:67:in `tagged'
2014-07-15T01:54:42.458086+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2014-07-15T01:54:42.457748+00:00 app[web.1]:                                           ^
2014-07-15T01:54:42.457786+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR:  relation "users" does not exist
2014-07-15T01:54:42.457808+00:00 app[web.1]:                  AND a.attnum > 0 AND NOT a.attisdropped
2014-07-15T01:54:42.457823+00:00 app[web.1]:                                           ^
2014-07-15T01:54:42.457837+00:00 app[web.1]: F, [2014-07-15T01:54:42.457567 #2] FATAL -- : 
2014-07-15T01:54:42.457994+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:80:in `call'
2014-07-15T01:54:42.458080+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
2014-07-15T01:54:42.457775+00:00 app[web.1]:                   ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2014-07-15T01:54:42.457790+00:00 app[web.1]: :               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
2014-07-15T01:54:42.457815+00:00 app[web.1]: 
2014-07-15T01:54:42.457830+00:00 app[web.1]:                WHERE a.attrelid = '"users"'::regclass
2014-07-15T01:54:42.457844+00:00 app[web.1]:                      pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
2014-07-15T01:54:42.457852+00:00 app[web.1]: ):
2014-07-15T01:54:42.457869+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:137:in `exec_query'
2014-07-15T01:54:42.457879+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/model_schema.rb:249:in `column_defaults'
2014-07-15T01:54:42.457889+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/abstract_controller/base.rb:189:in `process_action'
2014-07-15T01:54:42.457978+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
2014-07-15T01:54:42.457987+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/abstract_controller/base.rb:136:in `process'
2014-07-15T01:54:42.458006+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/journey/router.rb:59:in `each'
2014-07-15T01:54:42.458025+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call'
2014-07-15T01:54:42.458036+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/query_cache.rb:36:in `call'
2014-07-15T01:54:42.458064+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
2014-07-15T01:54:42.458070+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/tagged_logging.rb:25:in `tagged'
2014-07-15T01:54:42.458085+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
2014-07-15T01:54:42.458098+00:00 app[web.1]: 
2014-07-15T01:54:42.457743+00:00 app[web.1]: I, [2014-07-15T01:54:38.772178 #2]  INFO -- :   Parameters: {"id"=>"favicon"}
2014-07-15T01:54:42.457779+00:00 app[web.1]:                ORDER BY a.attnum
2014-07-15T01:54:42.457805+00:00 app[web.1]:                   ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2014-07-15T01:54:42.457820+00:00 app[web.1]: E, [2014-07-15T01:54:42.453393 #2] ERROR -- : PG::UndefinedTable: ERROR:  relation "users" does not exist
2014-07-15T01:54:42.457834+00:00 app[web.1]: 
2014-07-15T01:54:42.457847+00:00 app[web.1]:                   ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2014-07-15T01:54:42.457857+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:138:in `block in exec_query'
2014-07-15T01:54:42.457873+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/schema_cache.rb:114:in `block in prepare_default_proc'
2014-07-15T01:54:42.457883+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/inheritance.rb:27:in `new'
2014-07-15T01:54:42.457972+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:453:in `_run__4514452787871170963__process_action__callbacks'
2014-07-15T01:54:42.457982+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/notifications.rb:159:in `instrument'
2014-07-15T01:54:42.457991+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
2014-07-15T01:54:42.458019+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call'
2014-07-15T01:54:42.458030+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/flash.rb:241:in `call'
2014-07-15T01:54:42.458040+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:373:in `_run__334764084810054671__call__callbacks'
2014-07-15T01:54:42.458068+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/rack/logger.rb:20:in `block in call'
2014-07-15T01:54:42.458077+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
2014-07-15T01:54:42.458095+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2014-07-15T01:54:42.973218+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=salty-eyrie-7842.herokuapp.com request_id=69a6e098-6a11-427a-8480-312e3dad0672 fwd="72.89.136.238" dyno=web.1 connect=1 service=79 status=500 bytes=1200

1 Answer

David Moore
David Moore
13,916 Points

Hey Javier Nunez! I see a recurring error in your log that could have something to do with your issues:

ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR:  relation "users" does not exist

I would suggest digging into your postgres databases just to be sure you have that table. Not sure what OS you are on but I use the free version of PG Commander and really like it.

Also, as for the CSS. Make sure to precompile your assets if you have not. Often this is why your css doesn't display as expected (at least it was for me).

Hope this helps!

Javier Nunez
Javier Nunez
7,529 Points

i am on mac 10.9, I've downlaoded PG commander but I am unsure what to put in the form where "host" "user" "password" "port" and "database" etc show up when I open it up. And what do you mean by precompile assets?

David Moore
David Moore
13,916 Points

Host should be 'localhost', user should be your os user by default, database should be your os user by default, and port should be 5432 by default. Of course, you could have customized any of these with your installation.

You can read more about precompiling assets at http://guides.rubyonrails.org/asset_pipeline.html. Section 4.1 specifically deals with precompiling. For even more specific info, here is Heroku's own take on the Rails Asset Pipeline: https://devcenter.heroku.com/articles/rails-asset-pipeline

Hope this helps!