Skip to content
This repository has been archived by the owner on Nov 16, 2018. It is now read-only.

Latest commit

 

History

History
96 lines (65 loc) · 1.94 KB

getting_start.md

File metadata and controls

96 lines (65 loc) · 1.94 KB

開発のはじめ方

はじめに

  • middleman

middleman を使ってサイトを構築していきます。 middleman は公式の日本語サイトが充実していて、基本的に公式を見たら出来そうな感じです。 ちょっと困っても、 github に上がっている source を参考にできます。

開発環境の作り方(Mac)

  • コンパイルツール
$ 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

Bundlerを使ったGemパッケージの管理

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