Heroku在Windows上拉postgresql [英] heroku pull postgresql on windows

查看:71
本文介绍了Heroku在Windows上拉postgresql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过以下方式将heroku数据库拉到本地Windows计算机上

I'm trying to pull a heroku database to my local Windows computer by using

heroku pg:pull HEROKU_POSTGRESQL_DATABASE mydatabase --app myapp

但是,当我运行此命令时,出现以下错误:

However, when I run this command I get the following error:


'env'不被识别为内部或外部命令,可操作的
程序或批处理文件。 !找不到本地psql命令!
有关安装psql的帮助,请参见 PostgreSQL本地设置

我的路径中确实有psql,并且可以从命令行成功调用psql。我什至可以成功调用 heroku pg:info --app myapp ,它显示了我的数据库的存在。

I do have psql in my path, and I can successfully call psql from my command line. I can even call heroku pg:info --app myapp successfully, and it shows the existence of my database.

有任何建议吗?

推荐答案

我相信这里给出的答案确实不准确,所以我会回答:

I believe the answer given here is really inaccurate so I will answer:

请参见,当出现诸如'env'未被识别为内部或外部命令,可操作程序或批处理文件之类的错误时,这意味着系统正在尝试执行名为env的命令。这与设置环境变量完全无关。

See, when there is an error such as "'env' is not recognized as an internal or external command, operable program or batch file" it means that the system is trying to execute a command named env. This has nothing to do at all with setting up your environment variables.

Env在Windows中不是命令,而在Unix中。我了解您虽然拥有Windows机器。您可以做的是运行 git bash。 (您可以单独获得它,但它带有Heroku的CLI)。

Env is not a command in windows, but in unix. I understand that you have a windows machine though. What you can do is run "git bash". (You could get it by itself but it comes with Heroku's CLI).

这为您提供了一个类似Unix的环境,其中支持 env命令,然后您可以运行实际的heroku pg:pull命令:)

This gives you a unix-like environment where the "env" command is supported, and then you can run the actual heroku pg:pull command :)

我希望这会有所帮助!

这篇关于Heroku在Windows上拉postgresql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆