<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <id>tag:railsonpostgresql.com,2005:/2009/09/04/rails-postgresql-and-database-drivers</id>
  <link type="text/html" href="http://railsonpostgresql.com" rel="alternate"/>
  <link type="application/atom+xml" href="http://railsonpostgresql.com/2009/09/04/rails-postgresql-and-database-drivers.atom" rel="self"/>
  <title>Rails on PostgreSQL : Rails, PostgreSQL, and database drivers</title>
  <subtitle type="html">&lt;h3&gt;If you like Ruby on Rails, you'll love Rails on PostgreSQL!&lt;/h3&gt;</subtitle>
  <updated>2010-07-24T16:27:51+00:00</updated>
  <generator version="4.x" uri="http://www.typosphere.org">Typo</generator>
  <entry>
    <id>tag:railsonpostgresql.com,2005:Comment/1</id>
    <published>2009-09-04T21:55:37+00:00</published>
    <updated>2010-07-24T16:27:51+00:00</updated>
    <link type="text/html" href="http://railsonpostgresql.com/2009/09/04/rails-postgresql-and-database-drivers#comment-1" rel="alternate"/>
    <author>
      <name>alex@alexkane.net</name>
    </author>
    <title type="html">Comment on Rails, PostgreSQL, and database drivers by alex@alexkane.net</title>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <div xmlns="http://www.w3.org/1999/xhtml">
<p>Great website!
Is the new pg driver much faster?</p>        </div>
      </div>
    </content>
  </entry>
  <entry>
    <id>tag:railsonpostgresql.com,2005:Comment/2</id>
    <published>2009-09-04T22:27:42+00:00</published>
    <updated>2010-07-24T16:27:51+00:00</updated>
    <link type="text/html" href="http://railsonpostgresql.com/2009/09/04/rails-postgresql-and-database-drivers#comment-2" rel="alternate"/>
    <author>
      <name>Tom Copeland</name>
    </author>
    <title type="html">Comment on Rails, PostgreSQL, and database drivers by Tom Copeland</title>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <div xmlns="http://www.w3.org/1999/xhtml">
<p>@alex, Thanks!  I haven&#8217;t seen any benchmarks&#8230; but it&#8217;s definitely the way to go.</p>        </div>
      </div>
    </content>
  </entry>
  <entry>
    <id>tag:railsonpostgresql.com,2005:Comment/8</id>
    <published>2009-09-18T10:15:38+00:00</published>
    <updated>2010-07-24T16:27:51+00:00</updated>
    <link type="text/html" href="http://railsonpostgresql.com/2009/09/04/rails-postgresql-and-database-drivers#comment-8" rel="alternate"/>
    <author>
      <name>Darren Boyd</name>
    </author>
    <title type="html">Comment on Rails, PostgreSQL, and database drivers by Darren Boyd</title>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <div xmlns="http://www.w3.org/1999/xhtml">
<p>On OSX (Leopard), this is the process I used to get the native gem to build&#8230;</p>

<pre><code>sudo su -
export ARCHFLAGS='-arch i386'
export PATH=/opt/local/lib/postgresql83/bin:$PATH
gem install pg
&lt;control + d to log out of super user&gt;
</code></pre>

<p>Note that the postgres bin path is specific to my installation.</p>        </div>
      </div>
    </content>
  </entry>
  <entry>
    <id>tag:railsonpostgresql.com,2005:Comment/9</id>
    <published>2009-09-30T10:44:44+00:00</published>
    <updated>2010-07-24T16:27:51+00:00</updated>
    <link type="text/html" href="http://railsonpostgresql.com/2009/09/04/rails-postgresql-and-database-drivers#comment-9" rel="alternate"/>
    <author>
      <name>Wayne E. Seguin</name>
    </author>
    <title type="html">Comment on Rails, PostgreSQL, and database drivers by Wayne E. Seguin</title>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <div xmlns="http://www.w3.org/1999/xhtml">
<p>You do not need to install gems as root. If the reason is &#8220;because then the command shows up&#8221; then add the user&#8217;s gem directory to your path:</p>

<pre><code>PATH=$PATH:~/.gem/ruby/1.8/bin</code></pre>

<p>You can even set this exclusively:</p>

<pre><code>GEM_HOME=~/.gem/ruby/1.8</code></pre>

<p>For the purposes of pg gem, in order to cover both bases (both 32 &amp; 64 bit compiled postgres installs) on OSX:</p>

<pre><code>ARCHFLAGS="-arch i386 -arch x86_64"</code></pre>

<p>Ensure that your path has psql in it as noted above. Change /opt/local/lib/postgresql83/bin to wherever you have pg_config located. For me this is:</p>

<pre><code>PATH=$PATH:/usr/local/postgresql/bin ; export PATH</code></pre>

<p>Then install the gem.</p>

<pre><code>gem install pg</code></pre>

<p>This non-root technique is especially useful when you have multiple ruby versions installed and are actively switching/using all of them ( I use rvm for this <a href="http://rvm.beginrescueend.com/" rel="nofollow">http://rvm.beginrescueend.com/</a> )</p>

<p>w00t for Postgres!</p>        </div>
      </div>
    </content>
  </entry>
  <entry>
    <id>tag:railsonpostgresql.com,2005:Comment/12</id>
    <published>2009-09-30T11:46:14+00:00</published>
    <updated>2010-07-24T16:27:51+00:00</updated>
    <link type="text/html" href="http://railsonpostgresql.com/2009/09/04/rails-postgresql-and-database-drivers#comment-12" rel="alternate"/>
    <author>
      <name>Tom Copeland</name>
    </author>
    <title type="html">Comment on Rails, PostgreSQL, and database drivers by Tom Copeland</title>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <div xmlns="http://www.w3.org/1999/xhtml">
<p>@wayne, true&#8230; I guess that most of the time when I install a gem, though, I want it to be available to all user accounts on the box.  But you&#8217;re right, another possibility is to just install it to your home directory.</p>        </div>
      </div>
    </content>
  </entry>
</feed>

