いい時代になったなぁ

10代の頃にプログラミングに挫折した30代の学び直しブログ

Rails Tutorialでherokuにアップロードできなかったときの対処

cloud9でうまくいっていなかったRuby on Rails チュートリアル:実例を使って Rails を学ぼう1章最後のherokuへのアップデート。
Nitrous.ioでやり直しても失敗した。
 
こんなメッセージ。
 

Application Error

An error occurred in the application and your page could not be served. Please try again in a few moments.

If you are the application owner, check your logs for details.

 
エラーメッセージで検索をかけた所、こちらの記事がヒット。
 
で、この記事の通り、application_controller.erbの1行めに
 
# -*- encoding: utf-8 -*-
と記載する。それから、再度git push heroku master
 
……「everything up-to-date」と出てくる。
 
みんな最新でっせ、ということか。
 
そして、再度アクセスしてもエラー表示は変わらず。
 
おかしーなー。
 
で、herokuの「deploy」のところを見ると、このコマンド打てよと書いてくれていた。
親切。
 

Deploy your changes

Make some changes to the code you just cloned and deploy them to Heroku using Git.

$ git add .
$ git commit -am "make it better"
$ git push heroku master
そのとおりにコマンドを打って、アクセスしたところ、ちゃんと表示された! (^O^)
 
なんか嬉しい。
 
それにしても、herokuは無料だと5つまでしか領域作れないのね(^_^;)