views:

140

answers:

1

I just pushed my local rails app to heroku and then ran

heroku rake db:migrate

This created all the tables and stuff on my heroku server. However, I have just 4 rows in a table which I would like to insert into tables just created on heroku.

So I used

heroku db:push

But this gives me an error

Auto-detected local database: postgres://myuser:[email protected]/420railsdb?encoding=utf8
Failed to connect to database:
  Sequel::DatabaseConnectionError -> PGError FATAL:  password authentication failed for user

"myuser"

my database.yml looks like this

development:
  adapter: postgresql
  encoding: unicode
  database: myrailsdb
  pool: 5
  username: myuser
  password: samplepwd

btw, I am in my early days with postgresql and rails. So please dumb down the answer ...

A: 

I don't know Heroku at all.

Are you certain there exists a Postgres user "myuser" with the password "samplepwd" for the correct database on the Postgres server you are trying to connect to? see: man createuser

Also, the "auto-detected ..." line seems to suggest the database name used is "420railsdb", while the .yml file has "myrailsdb" as database name. List the existing databases with "psql -l" to see which one is the correct one.

Bandi-T