始终Heroku的命令失败(Heroku comannd always fails)

2019-10-29 22:23发布

我安装Windows10的Heroku,toolbelt.exe。 每当我输入的命令提示符“的Heroku”,它下面会失败。 我不知道prblrm是什么。 任何帮助将不胜感激。

noriko@NORIKO-VAIO C:\Users\noriko
> heroku --version
Installing Heroku Toolbelt v4... done.
For more information on Toolbelt v4: https://github.com/heroku/heroku-cli
Setting up node-v4.1.2... done
Updating plugins... done
Installing core plugins heroku-cli-addons, heroku-apps, heroku-fork, heroku-git, heroku-local, heroku-run...Error reading plugin heroku-status.         Reinstalling... done
 done
"\x80" on Windows-31J
C:/Program Files (x86)/Heroku/ruby-    1.9.3/lib/ruby/1.9.1/json/common.rb:148:in `encode'
C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/1.9.1/json/common.rb:148:in `initialize'
C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/1.9.1/json/common.rb:148:in `new'
C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/1.9.1/json/common.rb:148:in `parse'
C:/Program Files (x86)/Heroku/lib/heroku/helpers.rb:218:in `json_decode'
C:/Program Files (x86)/Heroku/lib/heroku/jsplugin.rb:82:in `commands_info'
C:/Program Files (x86)/Heroku/lib/heroku/jsplugin.rb:77:in `commands'
C:/Program Files (x86)/Heroku/lib/heroku/jsplugin.rb:204:in `find_command'
C:/Program Files (x86)/Heroku/lib/heroku/jsplugin.rb:12:in `try_takeover'
C:/Program Files (x86)/Heroku/lib/heroku/cli.rb:24:in `start'
C:/Program Files (x86)/Heroku/bin/heroku:29:in `<main>'
Error:       "\x80" on Windows-31J (Encoding::InvalidByteSequenceError)
Command:     heroku --version
Version:     heroku/toolbelt/3.42.16 (i386-mingw32) ruby/1.9.3
More information in C:/Users/noriko/.heroku/error.log

Answer 1:

我自己解决了这个。
我编辑的Heroku /斌/ heroku.bat的最后一行如下。

from  
@ruby.exe "%~dpn0" %*  
to  
@ruby.exe -Eutf-8 "%~dpn0" %*


文章来源: Heroku comannd always fails