Unable to use Heroku from the commandline

2019-07-17 07:45发布

Currently I'm making a Facebook app with Heroku, I did as the instruction says, but then I get stuck after installing heroku-toolbelt. I opened cmd.exe, typed something like 'heroku', but it results in an error as follows

C:/Program Files/Heroku/bin/heroku:15:in []': code converter not found (UTF-16LE to Windows-1258) (Encoding::ConverterNotFoundError) from C:/Program Files/Heroku/bin/heroku:15:in'

I don't know what is the problem, searching around but there's no luck at all.

Does anyone have an idea of what I am doing wrong?

3条回答
三岁会撩人
2楼-- · 2019-07-17 08:21

Just typing heroku in the command line won't do anything. First go to the directory where you have set up a folder to put all the files of your app from command line using DOS commands. Then type heroku login. It'll prompt you for user credentials for your heroku account. Enter those correctly and you're good to go from there.

查看更多
Evening l夕情丶
3楼-- · 2019-07-17 08:29

I need to dig around some more and find a way to build in this kind of functionality, but as a work around, if you open a new command prompt and type "chcp 1252" prior to running any commands it will switch command.exe to a compatible code page. That should prevent encoding errors of this type. Sorry for the inconvenience, but it should at least function as a stop gap and I'll work to integrate a fix into the tool itself. Thanks!

查看更多
疯言疯语
4楼-- · 2019-07-17 08:30

I encountered the same error as you did. Windows-1258 is text code for Vietnamese language. I figured something like to stop converting text code automatically to Windows- 1258.

So here is how it works for me. Hope it works for you too. Simply go to Control Panel --> Change keyboards or other input method --> Administrative tab --> Change System Locale (from Vietnamese to English (United States) for example). Restart and work like a charm!

查看更多
登录 后发表回答