前からちょっと気になったので使ってみた。
主に Middlemanガイドの和訳 を参考にした。
ちなみに環境は以下。
- Mac OS X 10.9
- rbenv 0.4.0-48-g5130b41 + ruby 2.0.0p195
インストール
gemからインストール。
$ gem install middleman
なんかエラー出てたけど見なかったことにする。
unable to convert "\x89" from ASCII-8BIT to UTF-8 for lib/middleman-core/meta_pages/assets/glyphicons-halflings.png, skipping
(中略)
unable to convert "\x89" from ASCII-8BIT to UTF-8 for lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/images/icon_calendar.png, skipping
はじめてみる
$ middleman init my_new_project
またしてもエラー。
さすがに前に進まないので真面目にエラー読む。
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
(中略)
An error occurred while installing eventmachine (1.0.3), and Bundler cannot
continue.
Make sure that `gem install eventmachine -v '1.0.3'` succeeds before bundling.
軽くネットで調べた感じだとXcode Command line toolsが入ってないのが原因っぽいので適当に入れる。
$ xcode-select --install
$ sudo xcodebuild -license
Xcodeのインストール周りは下のサイトを参考にした。
もう一回やったらちゃんとinitできた。
とりあえず動いたので今日はここまで。