Seeing this?
Installing pg (0.11.0) with native extensions /Users/mrm/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:533:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/Users/mrm/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Wondering how or where to get this mythical pg_config? It’s part of the PostgreSQL package. If you’re running MacPorts, it’s easy:
sudo port install postgresql90
Then, following the instructions on the RVM website, run
gem install pg -- --with-pg-config=/opt/local/lib/postgresql90/bin/pg_config
Related posts:
- Quick MacPorts Installation of Ruby on Rails
October 2010 update: I wrote this a while back, before I knew about RVM. The Ruby Version Manager has a bunch of features that makes it better than macports for...... - Apache2, PHP, and MySQL on Mac OS X using MacPorts
1. Install MacPorts Follow the instructions here: http://www.macports.org/install.php. 2. Install apache2 sudo port install apache2 Note that the macports instructions suggest installing the launchctl script now, but we’ll do that...... - HOWTO: Fix Ruby on Rails 2.3.x textarea Value Truncation
Turns out that Rails versions 2.3.6 through 2.3.8 have a pretty horrid parameter-parsing bug, and I’m surprised there hasn’t been more hoopla about it. If you have a textarea form...... - HOWTO: Make system-wide RVM installations work with cron, monit, delayed_job, and passenger
System-wide RVM installations are recommended for production deployments, but because /usr/bin/ruby is no longer the “correct” ruby, you need to tell all your moving parts about RVM. Before installing ruby......