Wins Lin
2013-Jun-19 09:26 UTC
[Rails] Heroku's “pg:psql” command doesn't work. How to pass commands to load schema from structure.sql?
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.sqlBut 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 DATABASEThen 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-- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5c4b6eb8fddc057954e296b4840e7b77%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
Wins Lin
2013-Jun-19 09:27 UTC
[Rails] Heroku's “pg:psql” command doesn't work. How to pass commands to load schema from structure.sql?
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.sqlBut 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 DATABASEThen 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 foundBut 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? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/50ca737c108eecf0a5c0de140ea74695%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
Jordon Bedwell
2013-Jun-19 10:42 UTC
Re: [Rails] Heroku's “pg:psql” command doesn't work. How to pass commands to load schema from structure.sql?
On Wed, Jun 19, 2013 at 4:27 AM, Wins Lin <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> 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... Use https://groups.google.com/forum/#!forum/heroku -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAM5XQnw-n9w-H-%2B%2BxwSiP78XhhRXDG19g_ep8EPL_MJSOhhKRQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Wins Lin
2013-Jun-19 11:26 UTC
[Rails] Re: Heroku's “pg:psql” command doesn't work. How to pass commands to load schema from structure.sql?
Jordon Bedwell wrote in post #1112859:> On Wed, Jun 19, 2013 at 4:27 AM, Wins Lin <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> 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. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f5e79e24793e79a9c5e33071f2c598ec%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
Peter Hickman
2013-Jun-19 13:24 UTC
Re: [Rails] Re: Heroku's “pg:psql” command doesn't work. How to pass commands to load schema 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. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CALxYQy48YrRmQtvdOpzFOaJJj9PtzZy8GV86K-5k6Yo0aLV7%2Bg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.