When I researched this I found that the tutorial here is missing crucial information and there are several questions here and complaints online about something about this tutorial. I am wondering if someone here successfully connected to Heroku local Postgresql in Windows and can help me. Presently I am stuck with this command
c:\>export DATABASE_URL=postgresql://localhost:5432/shouter
'export' is not recognized as an internal or external command,
operable program or batch file.
Is there a solution to this?
The export
command from *nix is SET
in Windows, so you should try:
SET DATABASE_URL=postgresql://localhost:5432/shouter
Here's a Windows commands reference page An AZ Index of the Windows CMD command line .
You should add postgresql to your environment variables in windows. See this tutorial: http://www.computerhope.com/issues/ch000549.htm
The Heroku article does mention this in passing, but you should add something like "c:\\postgresql\\bin" to the environment variable. Restart the command line, and see if the command works. (don't copy/paste my path, as you have to find your own path to /bin)
Although not strictly required, you ought to check out PgAdmin, as it is very helpful to visualize and manage your database, including where you are exporting your database.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.