- middleman
middleman を使ってサイトを構築していきます。 middleman は公式の日本語サイトが充実していて、基本的に公式を見たら出来そうな感じです。 ちょっと困っても、 github に上がっている source を参考にできます。
- コンパイルツール
$ xcode-select --install
- Homebrew
Middleware を含めたパッケージを管理
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- irb(Interactive Ruby)
$ brew install readline
- https
$ brew install openssl
- ruby-build, rbenv
Ruby バージョン切り替えツール
$ brew install ruby-build
$ brew install rbenv
- Set up path
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> .bash_profile
$ echo 'eval "$(rbenv init -)"' >> .bash_profile
$ source .bash_profile
- Ruby
rbenv を使って Ruby をインストールします。
$ rbenv install 2.3.0
- 標準で使う ruby のバージョンを切り替える
$ rbenv global 2.3.0
- 確認
$ rbenv versions
$ ruby -v
- Bundler
Ruby で使われるライブラリやアプリケーションは Gem と呼ばれる形式のパッケージにすることができます。 Bundler はアプリケーションに必要となる Gem パッケージの種類やバージョンを管理し、複数のPCで必要なGemパッケージをインストールする仕組みを提供してくれます。
$ gem install bundler
$ git clone https://github.com/jtf-2016/jtf-2016.github.io.git
$ cd jtf-2016.github.io
$ git checkout develop
$ bundle install
$ script/server
$ open http://127.0.0.1:4567