Heroku comannd always fails

旧巷老猫 提交于 2019-12-25 04:13:40

问题


I installed heroku-toolbelt.exe on Windows10. Whenever i enter "heroku" on the command prompt, it fails as below. I don't know what the prblrm is. Any help would be greatly appreciated.

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

回答1:


I resolved this by myself.
I edited last line of Heroku/bin/heroku.bat as follows.

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


来源:https://stackoverflow.com/questions/33029991/heroku-comannd-always-fails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!