GangstaGraham
GangstaGraham

Reputation: 9355

Can't Create A Scaffold using Rails - No password error

I m having trouble creating a scaffold with rails

I was following a tutorial when I ran into the following problem.

rails new SuperAwesomeApp -d postgresql
rails g scaffold item name:string description:text
.rvm/gems/ruby-2.0.0-p195/gems/activerecord-3.2.13/lib/active_record/
connection_adapters/postgresql_adapter.rb:1216:
in `initialize': fe_sendauth: no password supplied (PG::Error)

How do I supply rails / postgres with a password?

Still pretty new to rails, so I appreciate the help.

Upvotes: 1

Views: 453

Answers (2)

Calvin Odira
Calvin Odira

Reputation: 141

Another thing that you really need to tell is the host. If it is localhost, then in your config/database.yml, include;

    host: localhost

Upvotes: -1

ovatsug25
ovatsug25

Reputation: 8596

Open up you config/database.yml. You are probably missing a password required to access the database here. Example of database.yml

development:
  adapter: postgresql
  database: database_name
  host: 10.0.0.1
  port: 1433
  username: username
  password: passsword

Upvotes: 2

Related Questions