Created
June 5, 2010 12:36
-
-
Save workmad3/426594 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Get the .dmg | |
| There is a one-click installer available for PostgreSQL on Mac OS X. It packages the database up as a .dmg file. It is available here: http://www.enterprisedb.com/products/pgdownload.do#osx | |
| Edit your PATH | |
| The .dmg does the installation and setup, but it doesn't alter your PATH variable to include the PostgreSQL tools. To do this, edit | |
| ~/.bash_profile | |
| and add the lines | |
| PATH="/Library/PostgreSQL/8.4/bin/:${PATH}" export PATH | |
| Installing the postgres rubygem for Rails | |
| Once you have the binaries in your path, installing the postgres driver for ruby is simple. Just run | |
| sudo gem install pg | |
| This should compile the native extensions using pg_config for the required environment variables. Once done, you can access a PostgreSQL database from Ruby, or set it as the adapter for a Ruby on Rails database. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment