LoginSignup
1
1

More than 5 years have passed since last update.

Postgresqlのローカル設定 Mac

Posted at

Ruby On Railsの開発では、データベースの設定は欠かせない。
この設定を解決するのにだいぶ時間を要したので。PostgreSQLの設定を共有したいと思う。

PostgreSQLのローカル設定

まず先に基本的だが、
・Homebrew
・Xcode
・Command Line Tools
・Ruby
上記がインストールされていることが条件です。

ターミナル上でPostgreSQLをインストールします。
(homebrewを利用)

$brew install postgresql
ちょっと時間がかかります。

次にファイルを起動するために、自動的にPostgresqlが起動できるように、 ターミナル上で下記を。

$ln -sfv /usr/local/opt/postgresql/*plist ~/Library/LaunchAgents
$launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

以上、上記を順番にやっていけば、postgresqlの起動はできると思う。

Railsでの開発でherokuを利用する場合は、
postgresqlを利用しやすい。
(私の場合ですが。)

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1