All threads / Rails for Beginners Part 38: Deploying to Heroku Discussion

Ask A Question


You’re not receiving notifications from this thread.

Rails for Beginners Part 38: Deploying to Heroku Discussion

I wasn't able to see the error where the users database table does not exist. I'm not sure if this is because I am on free tier but only the requests show on the logs and not the error itself:

2021-02-07T18:34:24.162677+00:00 heroku[router]: at=info method=GET path="/sign_up" request_id=1d0bdd35-fa54-42ca-acc6-88b2a061905d fwd="" dyno=web.1 connect=0ms service=47ms status=500 bytes=1827 protocol=https

2021-02-07T18:34:26.270777+00:00 heroku[router]: at=info method=GET path="/" request_id=4a51fb0c-9e8d-42a5-8e2c-f8dd9ef6da4d fwd="" dyno=web.1 connect=1ms service=8ms status=200 bytes=3685 protocol=https

2021-02-07T18:34:26.486016+00:00 heroku[router]: at=info method=GET path="/packs/js/application-2d24cb02e79dc1ee88b7.js" request_id=f33fa757-c482-4423-a582-cd49534d7625 fwd="" dyno=web.1 connect=0ms service=1ms status=304 bytes=48 protocol=https

2021-02-07T18:34:26.498205+00:00 heroku[router]: at=info method=GET path="/assets/application-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css" request_id=76391c84-82c2-43b1-a1c1-53f3111bef19 fwd="" dyno=web.1 connect=1ms service=1ms status=304 bytes=48 protocol=https

2021-02-07T18:34:26.646311+00:00 heroku[router]: at=info method=GET path="/assets/application-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css" request_id=01a9a45f-b89c-4ef4-8361-fc89a27f2fb6 fwd="" dyno=web.1 connect=0ms service=1ms status=200 bytes=195 protocol=https

2021-02-07T18:34:26.811517+00:00 heroku[router]: at=info method=GET path="/packs/js/application-2d24cb02e79dc1ee88b7.js" request_id=249a55a6-b3fa-4868-b5f5-96d8ecf7b18f fwd="" dyno=web.1 connect=1ms service=2ms status=200 bytes=15905 protocol=https

2021-02-07T18:35:17.897899+00:00 heroku[router]: at=info method=GET path="/sign_up" request_id=fd19d46c-e12e-4ef3-8821-0505ffa219a8 fwd="" dyno=web.1 connect=1ms service=7ms status=500 bytes=1827 protocol=https

2021-02-07T18:36:41.193178+00:00 heroku[router]: at=info method=GET path="/sign_up" request_id=aee05fff-f7c9-4bf4-9ced-398de28e3bc6 fwd="" dyno=web.1 connect=1ms service=9ms status=500 bytes=1827 protocol=https

2021-02-07T18:40:07.355959+00:00 heroku[router]: at=info method=GET path="/sign_up" request_id=a1744b84-680b-49e1-b7b8-49063060392b fwd="" dyno=web.1 connect=0ms service=13ms status=500 bytes=1827 protocol=https

2021-02-07T18:40:07.668976+00:00 heroku[router]: at=info method=GET path="/favicon.ico" request_id=518a43fa-eb33-40b0-8ffc-8e8d8234a31c fwd="" dyno=web.1 connect=1ms service=2ms status=200 bytes=143 protocol=https

Hello fellow friends. In my case I did all wrong but in the end I finished.
Here are the stackoverflow =>
When I was doing the creation and migration command at rails I bumped with this mistake , so locally I managed to create a super user to my postgresql , I do no know it is ok , but solved the problem.

sudo -u postgres createuser --superuser YOURUSERNAME_HERE

Your solution worked for me - on Linux Ubuntu - Thank you :)


Hi anyone to help me with this error?

after_save_commit do
if publish_at_previously_changed?
TweetJob.set(wait_until: @tweet.publish_at).perform_later(self)

Rails.root: /home/adalberto/Documents/railsForBeginners/scheduled_tweets


If you see this error when pushing to Heroku...

git push heroku master
error: src refspec master does not match any
error: failed to push some refs to ' etc etc

It may be because your main git branch is not called master. It may be the newer "main"

Try "git push heroku main"

The erros is in local hard drive. Please could you review my code at /schedule_tweets


If you newly installed postgresql like me and you have no idea how to create your own user or especially if you are getting "Insufficient priviliges" error after creating your user. Then,

First use postgres user to connect to postgresql.

$ sudo -u postgres psql

Create a role with CREATE DB and LOGIN attributes

postgres=# create role <USERNAME> login createdb;

And then create a database that has the same name as the username you've used above.

postgres=# create database <USERNAME>;
Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 43,185+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2021 GoRails, LLC. All rights reserved.