-
Notifications
You must be signed in to change notification settings - Fork 2
macOS での環境構築
cloudliner edited this page Oct 26, 2016
·
10 revisions
仮想環境を起動させるのが面倒な人へ。 手順はおおよそです。。。
- 必要なソフトウェアは Heroku 以外 Homebrew でインストール可能
- Ruby のバージョンを合わせるのが重要
-
Homebrew
でrbenv
をインストールする -
rbenv
で、特定のバージョン(2.2.5)のruby
をインストールする
.travis.yml
に書いてある PostgreSQL のバージョンが 9.3 で、Vagrant のローカル環境は 9.4.8 で、Heroku は 9.5.4 なので、バージョンを合わせるのはやめました
- PostgreSQL をインストールする
$ brew install postgresql
- ここ を参考にして、PostgreSQL の起動・停止を行う
- 起動
$ brew services start postgresql
- 停止
$ brew services stop postgresql
- 状態確認
$ brew services list
-
Homebrew
でインストールする
-
ここを参考にして、git-completion と git-prompt を有効にするために、
~/.bash_profile
を編集して次の行を追加する
## Git
# Read script
source /usr/local/etc/bash_completion.d/git-completion.bash
source /usr/local/etc/bash_completion.d/git-prompt.sh
# Show information to prompt
GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWUPSTREAM=1
GIT_PS1_SHOWUNTRACKEDFILES=
GIT_PS1_SHOWSTASHSTATE=1
# Terminal
export PS1='\h:\W \u\[\033[1;30m\]$(__git_ps1)\[\033[0m\] \$ '
- 以下から、インストーラをダウンロードしてインストール
- https://devcenter.heroku.com/articles/heroku-command-line#download-and-install