Search code examples
ruby-on-railsfigaro-ruby

rails figaro database configuration is not working


I am using rails figaro with the following variables.

DEFAULT_URL_HOST: 'localhost'
DATABASE_URL: "postgresql://localhost/database_name?user=database_user"

When I am trying to run the server I am getting

fe_sendauth: no password supplied

the password is blank in my case.


Solution

  • I had a similar case and the solution was to restart spring. I double checked with Figaro documentation and everything was correct. As it turned out, spring probably cached env vars and the app didn't recognize that. Restarting spring (a gem that keeps your environment autoloaded) solved it. Not sure if this is the case with this question, but definitely something to try.