heroku / legacy-cli

Heroku CLI
https://cli.heroku.com
MIT License
1.37k stars 380 forks source link

Install problems with heroku #1953

Open strobejb opened 8 years ago

strobejb commented 8 years ago

I'm getting a lot of different errors when trying to install heroku. I've done a completely clean install (.heroku directory, and appdata\local\heroku deleted before install). This is on Windows 10, with Ruby installed in C:\Ruby\Ruby200

Please see below:

`heroku-cli: Installing CLI... 16.19MB/16.19MB ! read C:\Ruby\Ruby200: The handle is invalid. ! read C:\Ruby\Ruby200: The handle is invalid. ! read C:\Ruby\Ruby200: The handle is invalid. ! read C:\Ruby\Ruby200: The handle is invalid. Loading... !!! ! Unauthorized. events.js:160 throw er; // Unhandled 'error' event ^

Error: spawn heroku ENOENT at exports._errnoException (util.js:896:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32) at onErrorNT (internal/child_process.js:348:16) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9)`

jdx commented 8 years ago

It shouldn't be using your local ruby but the one provided with the CLI. Are you installing from toolbelt.heroku.com?

jdx commented 8 years ago

Also make sure LOCALAPPDATA is set to something valid

strobejb commented 8 years ago

Hi, Thanks for responding

Yes I'm installing from toolbelt.heroku.com

I don't have an environment variable LOCALAPPDATA - I set that accordingly and did a clean install but I still get the same error

jdx commented 8 years ago

I think your ruby is messed up somehow. Maybe try reinstalling that? Or maybe look at the PATH, and make it so the ruby from the toolbelt is used before the local ruby.

Also, what shell are you using?

strobejb commented 8 years ago

I removed my Ruby directory, but whenever I run 'heroku' I still get this:

! Error opening C:\Ruby\ ! Error opening C:\Ruby\ ! Error opening C:\Ruby\ ! Error opening C:\Ruby\ ! Error opening C:\Ruby\ ! Error opening C:\Ruby\

That directory doesn't exist now, but heroku is still looking for it? Strange, because I never saw this error before on prior versions of the heroku-cli, it only started happening when I updated

I'm using git-bash (on Win10), and also trying regular cmd.exe but the error is the same

Pretty sure my Ruby install is OK but I will try cleaning+reinstalling that tonight

thanks

jdx commented 8 years ago

Are there any environment variables with C:\Ruby\ in them? We don't use that path at all.

strobejb commented 8 years ago

I have Ruby in my path (which isn't the problem) C:\Ruby\Ruby200\bin

The culprits are:

SSL_CERT_DIR=C:\Ruby\ SSL_CERT_FILE=C:\Ruby\cacert.pem

Removing these gets rid of the "! Error opening C:\Ruby\" message, but I still get:

`Loading... !!! ! Unauthorized. events.js:160 throw er; // Unhandled 'error' event ^

Error: spawn heroku ENOENT at exports._errnoException (util.js:949:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32) at onErrorNT (internal/child_process.js:348:16) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) `

I tried running as Admin but still getting the unauthorized message

btw I need the SSL_CERT_xxx environment flags to be set for openssl :)

jdx commented 8 years ago

does heroku auth:whoami work?

strobejb commented 8 years ago

Yes that's returning the username/email I setup for Git

jdx commented 8 years ago

can you run it with HEROKU_DEBUG=1 HEROKU_DEBUG_HEADERS=1 and email it to me? jeff@heroku.com