アーカイブ

MacにPostgreSQLをインストールする。 このエントリーを含むはてなブックマーク はてなブックマーク - MacにPostgreSQLをインストールする。

2014 年 9 月 2 日 Comments off

いくつか気をつけるところあったのでメモ。

% sw_vers
ProductName:    Mac OS X
ProductVersion: 10.9.4
BuildVersion:   13E28
% brew install postgresql --no-tcl
% rm -rf `brew --prefix`/var/postgres
% initdb `brew --prefix`/var/postgres -E utf8
% ln -sfv `brew --prefix postgresql`/*.plist ~/Library/LaunchAgents
% launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

※1 Homebrewが勝手にinitdbしちゃうのでエンコーディング指定して再実行する
※2 作業するときにはtmuxは使わない(launchctlで失敗する)

% ARCHFLAGS="-arch x86_64" bundle install

※3 pgのgem入れるときにはARCHFLAGSを付ける

カテゴリー: Mac, Ruby タグ: