maybe icon indicating copy to clipboard operation
maybe copied to clipboard

Add dotenv-rails gem to fix environment variable error for db setup

Open kiliczsh opened this issue 2 years ago • 3 comments

Environment variables were not read by db setup command.

rails db:setup --trace
** Invoke db:setup (first_time)
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:load_config
** Execute db:create
connection to server at "127.0.0.1", port 5432 failed: fe_sendauth: no password supplied
Couldn't create 'maybe_development' database. Please check your configuration.
bin/rails aborted!
ActiveRecord::ConnectionNotEstablished: connection to server at "127.0.0.1", port 5432 failed: fe_sendauth: no password supplied (ActiveRecord::ConnectionNotEstablished)

@Shpigford

kiliczsh avatar Feb 06 '24 20:02 kiliczsh

Environment variables were not read by db setup command.

rails db:setup --trace
** Invoke db:setup (first_time)
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:load_config
** Execute db:create
connection to server at "127.0.0.1", port 5432 failed: fe_sendauth: no password supplied
Couldn't create 'maybe_development' database. Please check your configuration.
bin/rails aborted!
ActiveRecord::ConnectionNotEstablished: connection to server at "127.0.0.1", port 5432 failed: fe_sendauth: no password supplied (ActiveRecord::ConnectionNotEstablished)

@Shpigford

I've just reported this error, thanks so much!

pmareke avatar Feb 06 '24 20:02 pmareke

Environment variables were not read by db setup command.

rails db:setup --trace
** Invoke db:setup (first_time)
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:load_config
** Execute db:create
connection to server at "127.0.0.1", port 5432 failed: fe_sendauth: no password supplied
Couldn't create 'maybe_development' database. Please check your configuration.
bin/rails aborted!
ActiveRecord::ConnectionNotEstablished: connection to server at "127.0.0.1", port 5432 failed: fe_sendauth: no password supplied (ActiveRecord::ConnectionNotEstablished)

@Shpigford

I've just reported this error, thanks so much!

Resolves #335

kiliczsh avatar Feb 06 '24 20:02 kiliczsh

Pointed out this issue on Discord earlier. I can confirm that this fixes it.

lorenzopalaia avatar Feb 06 '24 20:02 lorenzopalaia