iCoreTech Research Labs Just a placeholder

20Aug/0914

How to install pg (postgresql) gem on Snow Leopard, 64 bit

Install PostgreSQL from source/port for this, does not currently build against binary package.
PATH should be /usr/local/pgsql.

export PATH=/usr/local/pgsql/bin:${PATH}
env ARCHFLAGS="-arch x86_64" gem install pg

Or if you are using macports:

export PATH=/opt/local/lib/postgresql83/bin:${PATH}
env ARCHFLAGS="-arch x86_64" gem install pg

Related posts:

  1. Install id3lib-ruby on Snow Leopard
  2. Install MySQL and MySQL Ruby gem on Snow Leopard, 64 bit
  3. How to install Sphinx search engine in Snow Leopard, x86 and x86_64
  4. Install nokogiri and libxml2 on Snow Leopard
  5. Install Git from source on Snow Leopard 64 bit

11 Other Comments

Comments (14) Trackbacks (4)
  1. Good post… one question, though. Do you use Passenger in development? If so, can you get PrefPane to work properly? Or really, just passenger altogether. My [appname].local stuff just died after the Snow Leopard install. Feel free to email if that’s easier. Thanks!

    This comment was originally posted on The Life Of A Radar

  2. The url for limechat is wrong, it should be http://limechat.net/mac/ and not .org

    This comment was originally posted on The Life Of A Radar

  3. Thanks Jason, fixed this!

    This comment was originally posted on The Life Of A Radar

  4. Other Ryan:

    I am currently working on something called driver: http://github.com/radar/driver. Just stuck at the moment on being able to select a directory, but progress is going good. I’ll let you know how it goes.

    This comment was originally posted on The Life Of A Radar

  5. thanks for the references to my blog, glad it was helpful to some

    This comment was originally posted on The Life Of A Radar

  6. I couldn’t get mongrel to work with script/server, even when i uninstalled and re-installed the gem.

    The fix was to remove mongrel, cgi_multipart_eof_fix, fastthread, ferret, libxml-ruby, and rack, and then to re-install mongrel. Once I did that, and re-installed fastthread, ferret, libxml-ruby, and rack, it worked.

    I think the issue was with uninstalling mongrel not also uninstalling cgi_multipart_eof_fix, but I also removed other gems (listed above) that sounded like they might be a part of mongrel.

    Now I can do script/server and it works with mongrel.

    This comment was originally posted on The Life Of A Radar

  7. By install and un-install above I mean doing so with gems:

    1. gem uninstall mongrel cgi_multipart_eof_fix
    2. gem uninstall fastthread ferret libxml-ruby rack
    3. gem install mongrel
    4. gem install fastthread ferret libxml-ruby rack

    This comment was originally posted on The Life Of A Radar

  8. To #1 Ryan: Passsenger Pref Pane just got updated. It’s working properly now, even though it’s still 32-bit.

    Also, the MySQL package from MySQL tends to muck things up. So, I always go from MacPorts.
    I documented the process here: http://blog.twg.ca/2009/09/livin-on-the-edge-ruby-rails-and-snow-leopard

    Check it out…

    This comment was originally posted on The Life Of A Radar

  9. This works also if you have installed postgresql via mac ports, just ignore the export PATH

  10. I’ve heard there are some wildlife groups trying to get Apple to do more stuff with the actual S.L.’s lol. I don’t know- people are saying it’s good PR for Apple- they should jump on that.

    This comment was originally posted on The Life Of A Radar

  11. This is eerily similar to my own set up! Nice write up, thanks for sharing.

    This comment was originally posted on The Life Of A Radar

  12. Да спасиб щас про это и у себя нацарапаю

    This comment was originally posted on The Life Of A Radar

  13. Thanks for this. Forgot that it was -arch x86_64 not -arch i386.

  14. Thanks for the tip; solved my problem.


Leave a comment


Additional comments powered by BackType