Herokuにデプロイ!
前回:GitのセットアップとGitHubへのアップロード から
Gitのブランチ作成は順調に完了。続いてHerokuにデプロイ
$ bundle install --without production
Gem::FilePermissionError: You don't have write permissions into the .....
An error occurred while installing rake (10.1.0), and Bundler cannot continue.
Make sure that `gem install rake -v '10.1.0'` succeeds before bundling.
エラー。でもこの手のエラーにはこれが効くことはもう知っている。
$ rvm 1.9.3-p448
これでなんなくクリア。
続いてHerokuのユーザー登録を終わらせる。ターミナルの再起動は必要なかった。
$ heroku login
EmailとPasswordを入力してストップ。
Could not find an existing public key.
Would you like to generate one? [Yn]
まぁ、Ynと入力したらできた。
順調に進めて、Herokuにリポジトリをプッシュ
$ git push heroku master
The authenticity of host 'heroku.com (50.19.85.132)' can't be established.
RSA key fingerprint is 8b:48:5e:67:0e:c9:16:47:32:f2:87:0c:1f:c8:60:ad.
Are you sure you want to continue connecting (yes/no)? yes
Please type 'yes' or 'no': yes
Warning: Permanently added 'heroku.com,50.19.85.132' (RSA) to the list of known hosts.
Connection closed by 50.19.85.132
fatal: The remote end hung up unexpectedly
SSH Fingerprints は目でよく見て確認してくれ、とHerokuにあったから、良く確認してyes。なぜか2度入力。
参照:Manually verifying -Git Repository SSH Fingerprints -Heroku
問題なのは、
fatal: The remote end hung up unexpectedly
でもこれも
$ heroku keys : add
だけでOK.
参照: Heroku Git - fatal: The remote end hung up unexpectedly -stackoverflow
詳細: Managein Your SSH Keys -heroku dev center
再度
$ git push heroku master
で完了。ずらーっと長いのがターミナルに書かれた。
お、これで第1章は完了らしい。図にあったHerokuの美しいインターフェースは見当たらなかったけど。