at posts/single.html

Heroku上でtDiaryを動かす

tDiary-3.1.3.20120516 で認証周りのコードをマージしてもらったので、 Heroku 上で良い感じに tDiary が動くようになってきた。 ただ、まだフィードを表示できないのでどうにかしたいところ。

tmpディレクトリに書き出す

Herokuでは基本的にファイルの書き込みはできないけど、logsとtmpディレクトリは例外。 …と思ったらこれは昔の話で、新しい ceder スタックでは仕組みが違うみたい。

Ephemeral Filesystem

Each dyno gets its own ephemeral filesystem, with a fresh copy of the most recently deployed code. During its lifetime the dyno can use the filesystem as a temporary scratchpad, but no files it writes are visible to any other dyno (including other dynos in the application) and any files written will be discarded the moment the dyno is stopped or restarted.

ということで、 @options['makerss.file'] = 'public/index.rdf' を指定して public ディレクトリにフィードを書き出せば一見動いているように見えるけど、 dyno が止まった時点でフィードが消えちゃう。

ちゃんと永続化する

方向性としてはやっぱりこっち。キャッシュで使っているmemcacheに書き出しても消えちゃうだろうから、データベースに格納するのかな。