-
Notifications
You must be signed in to change notification settings - Fork 382
Windows getting started notes
-
Downloaded and installed heroku-toolbelt.exe
-
Instead of using toolbelt generated key, I generated a key with "puttygen" from Putty.
-
heroku keys:add doesn't work. "The key was invalid" Key looks like this: ---- BEGIN SSH2 PUBLIC KEY ---- Comment: "rsa-key-20140702" AAAAB3NzaC1yc2EAAAABJQAAAQEAukmSsEc1eozc7isUEyDPw3RSU8RAYcBnQ249 TD/Fv9hTuNE7zHeFaePZavf+6LPmPrkDhBinankKe7P8/XiwyhQh9oQydIwTxPQi SvI/tXbata9NT9G0AXldnxpmPfg5elHv6/lX1xR/DYwgjkc7hBex/ToNgho8iHht uBl8jmdLTWrgeHpVWUhFpLz79QBTB5c5SXJNXUMv+bRLwBBF7eQiAQpdKZDDxOvj 4+aDUvFOakMLUlgGwyHEw5dytWeigSbPfU1j2HlomjZiBIcXdITJML525UrDQSPD 7pwsD/ElWTi4FGcxGwwjEpU45Dc8GMxQxJa06J6uWIOtbb6W8Q== ---- END SSH2 PUBLIC KEY ----
-
Tried to use
heroku keys:add
to generate a new key, it fails with "ssh-keygen" not recognized. I'm not running cygwin, so this isn't too surprising. -
Installed OpenSSH for Windows from
http://sourceforge.net/projects/sshwindows/?source=dlp
. Now ssh-keygen is available, and nowheroku keys:add
works. The key it generated looks like: ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAvVpytj37UYjOcKXnk81zTnvRj2S4j1yDRfrP9f0q7sxt KTPiCSDStgPS7mgKZ8UzOKsRgxcJblgDKKJzZju1y8uDN3io7dFFluLvnsvKx75TLxOxlwiQG921r3Zx qpQQ5NU3frTwqs6DruszHSNTjXyb3rqQB7XeJNzm0uSiBds= IEUser@IE10Win7basically the 1 line version.
-
[Ah, didn't realize that Git/bin includes ssh-keygen, but its never set on the path. That's obviously the fix here.]
-
Ah, now went back to
puttygen
and hand-copied the "OpenSSH compatible" key text into Notepad and saved. This one works withheroku keys:add
. -
Now branched to the Node tutorial
-
Installed Node.js
-
Tutorial gives me sample code, but doesn't tell me where to put it. By reading ahead I infer it goes in 'node-example'.
-
Tutorial doesn't say "create index.js with notepad" - had to infer that myself.
-
Ugh. 'package.json' created by npm doesn't use Windows CR/LF so everything is on one line.
-
Tutorial says to use
foreman start
but foreman isn't on the path. -
Ah, foreman is in ruby bin. Have to edit my PATH: set PATH=%PATH%;c:\Program Files\Heroku\ruby-1.9.2\bin
-
And
foreman
throws an error when I try to run it. -
Ah, node is thrown in error, but foreman hides it completely. Yay.
-
Hmmm, maybe I forgot npm install. Running now. Ok,
node index.js
works now. -
foreman start
still fails: C:\Users\IEUser\node-example>foreman start Bad file descriptor c:/Program Files/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/foreman-0.74.0/lib/ oreman/engine.rb:371:inread_nonblock' c:/Program Files/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/foreman-0.74.0/lib/ oreman/engine.rb:371:in
read_self_pipe' c:/Program Files/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/foreman-0.74.0/lib/ oreman/engine.rb:400:inblock (2 levels) in watch_for_output' c:/Program Files/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/foreman-0.74.0/lib/ oreman/engine.rb:398:in
loop' c:/Program Files/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/foreman-0.74.0/lib/ oreman/engine.rb:398:in `block in watch_for_output' 14:59:15 web.1 | exited with code 8 14:59:15 system | sending SIGKILL to all processes Probably some Windows-permission thing. Giving up on Foreman. -
Now trying to add files to git.
-
'git add' throws tons for CR/LF warning messages.
-
'git commit' fails because my user.email and user.name aren't set.
-
Ok, ran 'git config'. Now 'git commit' works.
-
Git push throws a 'Authenticity can't be established' warning. Gotta say Yes.
-
'heroku ps' says my app has crashed.
-
'heroku open' sends me to an error page.
-
Right, my Procfile is running
web.js
but I createdindex.js
because latest npm specifies that as the default script name. I didn't see that locally because Foreman never worked (presumably that was the issue). -
Editing Procfile to use index.js.
-
Nope. Foreman still doesn't work.
-
git push heroku master
-
Yay! Deployed app works now.