Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I think I've managed to find a way that works. I'm borrowing heavily from <a href="http://blog.blackwhale.at/2009/09/set-up-your-mac-for-rails-development/" rel="nofollow noreferrer">this great post</a><sup>1</sup>, but since they are installing a bunch of other stuff at the same time I'm going to write out what I did here for people who are just looking for the PostgreSQL install answer.</p> <p><sup>1</sup><sub> Editor's note: Link seemed dead when I tried. Is this the one? <a href="http://blog.blackwhale.at/?p=175#PostgreSQL" rel="nofollow noreferrer">http://blog.blackwhale.at/?p=175#PostgreSQL</a> Please fix if it is.</sub></p> <ol> <li><p>Download <a href="https://www.postgresql.org/download/macosx/" rel="nofollow noreferrer">PostgreSQL for Mac</a> and download the ‘Postgres.app’ installer.</p></li> <li><p>Create a user for your rails development (keep in mind that if you're sharing an application during development you'll probably want the same user between all members your dev team in order to avoid headaches)</p> <pre><code>sudo -u postgres /Library/PostgreSQL8/bin/createuser </code></pre></li> <li><p>Enter your Mac OS X system user name as role name, and make it a superuser.</p></li> <li><p>Install the pg gem so Rails can talk to PostgreSQL</p> <pre><code>sudo env PATH=/Library/PostgreSQL8/bin:$PATH gem install pg </code></pre></li> <li><p>Configure your rails app to talk to PostgreSQL. You can either create a new application with:</p> <pre><code>rails *appname* -d postgresql (for Rails 3 -&gt; rails new *appname* -d postgresql) </code></pre> <p>Or for an existing app, modify your <code>database.yml</code> file.</p></li> </ol> <p>This worked for me without any hiccups. If anyone else tries using this method I'd be interested to hear some feedback on how it went for you.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload