Used a time machine backup to sync files from my macbook running Leopard to my macbook pro running Lion. After having trouble pushing to heroku due to the fact that I was running sqlite3, I went down a rabbit hole in trying to get a pg gem installed.
gem install pg
yields:
/Users/taylorjackson/.rvm/rubies/ruby-1.9.2-p136/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/local/bin/pg_config
checking for libpq-fe.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
I'm a Unix noob and fear there's something deeply wrong with the file structure that was created by time machine in mashing up 32 bit leopard with 64 bit lion. Steps I've taken so far.
Reinstalled XCode
Xcode 4.3.3
Build version 4E3002
Installed command line tools in XCode from preferences.
updated to rvm 1.14.6 (master) with
rvm get head
Banged head against wall trying to install postgre locally with macports. uninstalled macports and installed homebrew
Followed recs from
brew doctor
then
brew install postgresql
ran into python issues and followed advice to install w/o python
brew install --no-python postgresql
seemed to get a clean install of postgresql, but my output from
gem install pg
is still:
/Users/taylorjackson/.rvm/rubies/ruby-1.9.2-p136/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/local/bin/pg_config
checking for libpq-fe.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Also tried
bundle install
and
bundle config build.pg --with-pg-config=/users/taylorjackson/postgresql/bin/pg_config
bundle install
with the same results My productivity for the last 7 hours has dropped to nothing. Can't find the relevant mkmf.log file. Any other ideas?
EDIT:
found mkmf.log. Here are relevant contents:
def have_devel?
unless defined? $have_devel
$have_devel = true
$have_devel = try_link(MAIN_DOES_NOTHING)
end
$have_devel
end
def try_do(src, command, &b)
unless have_devel?
raise <<MSG
The complier failed to generate an executable file.
You have to install development tools first.
MSG
end
begin
src = create_tmpsrc(src, &b)
xsystem(command)
ensure
log_src(src)
rm_rf 'conftest.dSYM'
end
end