blairanderson / rails-hackernews-reddit-producthunt-clone

hacker news / reddit / social link-sharing website. Built with Rails.
http://hackernews-rails-clone.herokuapp.com/
MIT License
114 stars 57 forks source link

postgres error after heroku deployment #5

Closed maephisto closed 8 years ago

maephisto commented 8 years ago

Hi! I've just deployed the app to heroku. using one click deployment, and i get a 500 on the home page. Here's the logs: Started GET "/" for 91.64.241.31 at 2016-11-10 13:59:10 +0000 2016-11-10T13:59:10.047417+00:00 app[web.1]: Processing by ItemsController#index as HTML 2016-11-10T13:59:10.049415+00:00 app[web.1]: Item Load (1.2ms) SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC 2016-11-10T13:59:10.049444+00:00 app[web.1]: PG::UndefinedTable: ERROR: relation "items" does not exist 2016-11-10T13:59:10.049445+00:00 app[web.1]: LINE 1: SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC 2016-11-10T13:59:10.049446+00:00 app[web.1]: ^ 2016-11-10T13:59:10.049446+00:00 app[web.1]: : SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC 2016-11-10T13:59:10.049571+00:00 app[web.1]: Completed 500 Internal Server Error in 2ms 2016-11-10T13:59:10.050306+00:00 app[web.1]: 2016-11-10T13:59:10.050307+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "items" does not exist 2016-11-10T13:59:10.050308+00:00 app[web.1]: LINE 1: SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC 2016-11-10T13:59:10.050308+00:00 app[web.1]: ^ 2016-11-10T13:59:10.050309+00:00 app[web.1]: : SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC): 2016-11-10T13:59:10.050309+00:00 app[web.1]: app/controllers/items_controller.rb:10:inindex' 2016-11-10T13:59:10.050309+00:00 app[web.1]:`

blairanderson commented 8 years ago

Did you run the migration and seed?

On Nov 10, 2016, at 6:02 AM, Marius M. notifications@github.com wrote:

Hi! I've just deployed the app to heroku. using one click deployment, and i get a 500 on the home page. Here's the logs: Started GET "/" for 91.64.241.31 at 2016-11-10 13:59:10 +0000 2016-11-10T13:59:10.047417+00:00 app[web.1]: Processing by ItemsController#index as HTML 2016-11-10T13:59:10.049415+00:00 app[web.1]: Item Load (1.2ms) SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC 2016-11-10T13:59:10.049444+00:00 app[web.1]: PG::UndefinedTable: ERROR: relation "items" does not exist 2016-11-10T13:59:10.049445+00:00 app[web.1]: LINE 1: SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC 2016-11-10T13:59:10.049446+00:00 app[web.1]: ^ 2016-11-10T13:59:10.049446+00:00 app[web.1]: : SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC 2016-11-10T13:59:10.049571+00:00 app[web.1]: Completed 500 Internal Server Error in 2ms 2016-11-10T13:59:10.050306+00:00 app[web.1]: 2016-11-10T13:59:10.050307+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "items" does not exist 2016-11-10T13:59:10.050308+00:00 app[web.1]: LINE 1: SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC 2016-11-10T13:59:10.050308+00:00 app[web.1]: ^ 2016-11-10T13:59:10.050309+00:00 app[web.1]: : SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC): 2016-11-10T13:59:10.050309+00:00 app[web.1]: app/controllers/items_controller.rb:10:inindex' 2016-11-10T13:59:10.050309+00:00 app[web.1]:`

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

blairanderson commented 8 years ago

Also when post code with multiple lines please use 3 backticks instead of 1 at it will look better.

On Nov 10, 2016, at 6:02 AM, Marius M. notifications@github.com wrote:

Hi! I've just deployed the app to heroku. using one click deployment, and i get a 500 on the home page. Here's the logs: Started GET "/" for 91.64.241.31 at 2016-11-10 13:59:10 +0000 2016-11-10T13:59:10.047417+00:00 app[web.1]: Processing by ItemsController#index as HTML 2016-11-10T13:59:10.049415+00:00 app[web.1]: Item Load (1.2ms) SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC 2016-11-10T13:59:10.049444+00:00 app[web.1]: PG::UndefinedTable: ERROR: relation "items" does not exist 2016-11-10T13:59:10.049445+00:00 app[web.1]: LINE 1: SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC 2016-11-10T13:59:10.049446+00:00 app[web.1]: ^ 2016-11-10T13:59:10.049446+00:00 app[web.1]: : SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC 2016-11-10T13:59:10.049571+00:00 app[web.1]: Completed 500 Internal Server Error in 2ms 2016-11-10T13:59:10.050306+00:00 app[web.1]: 2016-11-10T13:59:10.050307+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "items" does not exist 2016-11-10T13:59:10.050308+00:00 app[web.1]: LINE 1: SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC 2016-11-10T13:59:10.050308+00:00 app[web.1]: ^ 2016-11-10T13:59:10.050309+00:00 app[web.1]: : SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC): 2016-11-10T13:59:10.050309+00:00 app[web.1]: app/controllers/items_controller.rb:10:inindex' 2016-11-10T13:59:10.050309+00:00 app[web.1]:`

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

maephisto commented 8 years ago

After I posted the issue, i looked through the code a bit and saw the migration and seed tasks - runned them and everything worked out. But I was expecting that this would be done automatically by the deployment script. Or at least it should be mentioned in the Readme.

On Fri, Nov 11, 2016, 06:45 Blair Anderson notifications@github.com wrote:

Also when post code with multiple lines please use 3 backticks instead of 1 at it will look better.

On Nov 10, 2016, at 6:02 AM, Marius M. notifications@github.com wrote:

Hi! I've just deployed the app to heroku. using one click deployment, and i get a 500 on the home page. Here's the logs: Started GET "/" for 91.64.241.31 at 2016-11-10 13:59:10 +0000 2016-11-10T13:59:10.047417+00:00 app[web.1]: Processing by ItemsController#index as HTML 2016-11-10T13:59:10.049415+00:00 app[web.1]: Item Load (1.2ms) SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC 2016-11-10T13:59:10.049444+00:00 app[web.1]: PG::UndefinedTable: ERROR: relation "items" does not exist 2016-11-10T13:59:10.049445+00:00 app[web.1]: LINE 1: SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC 2016-11-10T13:59:10.049446+00:00 app[web.1]: ^ 2016-11-10T13:59:10.049446+00:00 app[web.1]: : SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC 2016-11-10T13:59:10.049571+00:00 app[web.1]: Completed 500 Internal Server Error in 2ms 2016-11-10T13:59:10.050306+00:00 app[web.1]: 2016-11-10T13:59:10.050307+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "items" does not exist 2016-11-10T13:59:10.050308+00:00 app[web.1]: LINE 1: SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC 2016-11-10T13:59:10.050308+00:00 app[web.1]: ^ 2016-11-10T13:59:10.050309+00:00 app[web.1]: : SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC): 2016-11-10T13:59:10.050309+00:00 app[web.1]: app/controllers/items_controller.rb:10:inindex' 2016-11-10T13:59:10.050309+00:00 app[web.1]:`

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/blairanderson/rails-hackernews-reddit-producthunt-clone/issues/5#issuecomment-259885961, or mute the thread https://github.com/notifications/unsubscribe-auth/AC6jxjSGoinLHp24J3VNUv_bLRnCXRpTks5q9AELgaJpZM4KusVJ .

blairanderson commented 8 years ago

Feel free to submit a pull request against the README to add any steps that I missed

On Nov 11, 2016, at 12:18 AM, Marius M. notifications@github.com wrote:

After I posted the issue, i looked through the code a bit and saw the migration and seed tasks - runned them and everything worked out. But I was expecting that this would be done automatically by the deployment script. Or at least it should be mentioned in the Readme.

On Fri, Nov 11, 2016, 06:45 Blair Anderson notifications@github.com wrote:

Also when post code with multiple lines please use 3 backticks instead of 1 at it will look better.

On Nov 10, 2016, at 6:02 AM, Marius M. notifications@github.com wrote:

Hi! I've just deployed the app to heroku. using one click deployment, and i get a 500 on the home page. Here's the logs: Started GET "/" for 91.64.241.31 at 2016-11-10 13:59:10 +0000 2016-11-10T13:59:10.047417+00:00 app[web.1]: Processing by ItemsController#index as HTML 2016-11-10T13:59:10.049415+00:00 app[web.1]: Item Load (1.2ms) SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC 2016-11-10T13:59:10.049444+00:00 app[web.1]: PG::UndefinedTable: ERROR: relation "items" does not exist 2016-11-10T13:59:10.049445+00:00 app[web.1]: LINE 1: SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC 2016-11-10T13:59:10.049446+00:00 app[web.1]: ^ 2016-11-10T13:59:10.049446+00:00 app[web.1]: : SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC 2016-11-10T13:59:10.049571+00:00 app[web.1]: Completed 500 Internal Server Error in 2ms 2016-11-10T13:59:10.050306+00:00 app[web.1]: 2016-11-10T13:59:10.050307+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "items" does not exist 2016-11-10T13:59:10.050308+00:00 app[web.1]: LINE 1: SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC 2016-11-10T13:59:10.050308+00:00 app[web.1]: ^ 2016-11-10T13:59:10.050309+00:00 app[web.1]: : SELECT "items".* FROM "items" ORDER BY "items"."rank" DESC): 2016-11-10T13:59:10.050309+00:00 app[web.1]: app/controllers/items_controller.rb:10:inindex' 2016-11-10T13:59:10.050309+00:00 app[web.1]:`

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/blairanderson/rails-hackernews-reddit-producthunt-clone/issues/5#issuecomment-259885961, or mute the thread https://github.com/notifications/unsubscribe-auth/AC6jxjSGoinLHp24J3VNUv_bLRnCXRpTks5q9AELgaJpZM4KusVJ .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.