html2haml がなぜか使えなかった

Sinatrahaml を使ってテンプレートを記述するために、gemでhamlを導入。

$ gem install haml

で、既存のHTMLを変換しようと html2haml を実行したのだけど、妙なエラーが出る。

$ html2haml
LoadError: cannot load such file -- hpricot
  Use --trace for backtrace.


hpricot ていうのが別に要るらしい。入れる。

$ gem install hpricot

これで変換できた。

$ html2haml input.html output.haml