Gitbash Windows 10中的Heroku错误

时间:2018-06-24 16:37:58

标签: ruby-on-rails windows git-bash heroku-toolbelt heroku-cli

我无法让Heroku在Windows 10的Gitbash中工作。

Gitbash version = 1.9.4.msysgit.2

错误消息:

$ heroku version

/c/Program Files (x86)/heroku/bin/../client/bin/heroku.cmd: 

line 1: @echo: command not found
/c/Program Files (x86)/heroku/bin/../client/bin/heroku.cmd: 

line 2: setlocal: command not found
/c/Program Files (x86)/heroku/bin/../client/bin/heroku.cmd: 

line 4: syntax error near unexpected token `('
/c/Program Files (x86)/heroku/bin/../client/bin/heroku.cmd: 

line 4: `if not "%HEROKU_REDIRECTED%"=="1" if exist "%LOCALAPPDATA%\heroku\client\bin\heroku.cmd" ('

非常感谢您的帮助!

谢谢

鲍巴·费特

My Windows Environment Variables

The Error Messages in Gitbash

2 个答案:

答案 0 :(得分:1)

更正Path变量后,我收到相同的错误。对我有用的是通过bash安装独立版本。卸载您拥有的heroku版本,然后在您的shell中运行命令curl https://cli-assets.heroku.com/install.sh | sh

答案 1 :(得分:0)

尝试使用常规Windows命令提示符(cmd.exe)测试heroku版本heroku --version,以确认已安装,并尝试使用where heroku命令检查其安装位置