1

I have been building an app for a few months now, I had it hosted on heroku, and I started making changes to it for a while without pushing to heroku, just working on localhost. I went to push it to heroku and ran into an issue with the asset pipeline not liking a variable in an erb tag. I took it out to get the code pushed, and ran into a bigger issue. Still, a 500 error but the logs now said:

ActionView::Template::Error (FATAL:  Peer authentication failed for user "fullstack".

Now, in my research on this issue, I attempted several things, and here are some of my findings.

I did not change the storage.yml or database.yml files at all. The production server is AWS s3 buckets, and they are connected to config.active_storage.service for both the production and development in the config/environments files.

The production user in the database.yml is named fullstack. The development user does not have a username or password. I was able to reset the server with the original username and password, but when I change the production username and reset the server it says

PG::ConnectionBad: fe_sendauth: no password supplied

So I go into the terminal and check the owner of the fullstack database, a few things with that. First I check psql -l to see all databases, and I have a fullstack_test and a fullstack_development, but no fullstack_production, and I think that is normal since rails only generate the dev and test on creation. Those two are owned by my Ubuntu user, sethb. I tried to create a fullstack_production database to see what would happen, and I get this error

PG::ConnectionBad: FATAL:  Peer authentication failed for user "fullstack"

When I was researching this, people were saying to change a setting in my pg_hba. I looked into mine and it already had set to: host all all all trust. I have been at this for about 20 hours at this point and I would love to hear if someone has an idea on how to fix this, I don't even know how to proceed with this honestly. Any help would be very much appreciated. I can also provide more info on any logs that I have had if it would help

MLavoie
  • 9,671
  • 41
  • 36
  • 56
sethb
  • 44
  • 2
  • 5

1 Answers1

0

So an update to the story, a half way solution. I was cloning the full project and aws, and when I went to push to heroku, someone helped me notice that I didn't have a node.js buildpack installed. As soon as I did that and pushed the new version, it worked. I tried rails s -e production, but that still throws a 500 error. This time it's saying application.css isn't present. But that is an issue I think someone has a solution for later. Either way, check your Heroku settings! Thank you

Seth B.

sethb
  • 44
  • 2
  • 5