I want to load schema from structure.sql file to Heroku’s database. On
my localhost machine I do as follows and all works just fine, all tables
are created:
C:> psql -U postgres -a -d MyApp_development -f C:\MyApp\db\structure.sql
But when I want to perform the same task on Heroku, it suddenly says !
App not found, although I provide all correct commands and data.
First of all, I get my credentials:
C:\Heroku\MyApp>heroku pg:credentials DATABASE
Then I do copy/paste credentials and run the command but get App not
found:
C:\Heroku\MyApp>heroku pg:psql DATABASE -U vmh… -a -d dc… -f
“C:\MyApp\db\structure.sql”
! App not found
But the app exists. When I run just heroku pg:psql I easily get
connected to my db:
C:\Heroku\MyApp>heroku pg:psql DATABASE
psql (9.2.4)
SSL-connection (key: DMN-…-…-…, bit: 256)
Enter “help” for information.
dc…=>
Why it says the app isn’t found? I provided all correct data. What else
do I need to pass to create tables on Heroku from structure.sql?
Your question is not a general deployment question. It is heavily
dependent
on Heroku and as such somewhere more focused would be a better place to
ask.
As proof look at all the replies you have received!
That is because people see “oh he’s having a problem with Heroku” (its
even
in the subject line) and then skip it because they know nothing about
Heroku.
Why it says the app isn’t found? I provided all correct data. What else
do I need to pass to create tables on Heroku from structure.sql?
This is not Heroku support…
Yes, this isn’t. But my questions is not only about Heroku. It is about
Rails deployment primarily. May Rails deployment questions be posted
here? I think yes.