Upgrading To Mountain Lion, PostgreSQL and Rails

I’m prob­a­bly late to the party on this since Moun­tain Lion has been out for an inter­net eter­nity but if I ever have to do it again or if some­one is a worse pro­cras­ti­na­tor than me, this will live in per­pe­tu­ity in the Google­verse to aid us on out travels.

I upgraded to Moun­tain Lion this week­end and sev­eral things imme­di­ately went wrong. I’ve already for­got­ten a cou­ple (which is why I’m writ­ing this) but the one I ran into last night involved cre­at­ing a new Rails site using Post­greSQL. When I did a “rails new”, I received the fol­low­ing error:

Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /Users/osiris43/.rvm/rubies/ruby-1.9.2-p136/bin/ruby extconf.rb 
checking for pg_config... yes
Using config values from /usr/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.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/Users/osiris43/.rvm/rubies/ruby-1.9.2-p136/bin/ruby
	--with-pg
	--without-pg
	--with-pg-dir
	--without-pg-dir
	--with-pg-include
	--without-pg-include=${pg-dir}/include
	--with-pg-lib
	--without-pg-lib=${pg-dir}/lib
	--with-pg-config
	--without-pg-config
	--with-pg_config
	--without-pg_config
/Users/osiris43/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to generate an executable file. (RuntimeError)
You have to install development tools first.
	from /Users/osiris43/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/mkmf.rb:452:in `try_cpp'
	from /Users/osiris43/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/mkmf.rb:853:in `block in find_header'
	from /Users/osiris43/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for'
	from /Users/osiris43/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postpone'
	from /Users/osiris43/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/mkmf.rb:254:in `open'
	from /Users/osiris43/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone'
	from /Users/osiris43/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/mkmf.rb:254:in `open'
	from /Users/osiris43/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'
	from /Users/osiris43/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'
	from /Users/osiris43/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/mkmf.rb:852:in `find_header'
	from extconf.rb:43:in `
' Gem files will remain installed in /Users/osiris43/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/pg-0.15.1 for inspection. Results logged to /Users/osiris43/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/pg-0.15.1/ext/gem_make.out An error occured while installing pg (0.15.1), and Bundler cannot continue. Make sure that `gem install pg -v '0.15.1'` succeeds before bundling.

Sev­eral Stack­Over­flow posts led me in dif­fer­ent direc­tions but even­tu­ally, I stum­bled onto the fol­low­ing which worked: Install lat­est XCode, upgrad­ing post­gres using home­brew (if you aren’t using Home­Brew, you’re really mak­ing life hard for your­self) and then run­ning bun­dle install again on the new rails app.


An Experiment in Permaculture

So in my trav­els through the inter­net and gar­den­ing web­sites and forums, I stum­bled across Per­mies. From there, I learned about Hugelkul­tur which is a way to build raised beds using old wood that even­tu­ally rots away all forest-like into what is sup­pos­edly an extremely drought tol­er­ant gar­den bed. Those words “drought tol­er­ant” caught my


Garden Update

Week­end event: Heard Museum plant sale, first week­end of the McK­in­ney Farmer’s Mar­ket Week­end tasks: Added 2000 pounds of soil and com­post to the north veg­gie bed to plant it with toma­toes and pep­pers; planted every­thing we bought at the Heard Museum plant sale includ­ing bee balm, mex­i­can hat, laven­der, hot and spicy oregano, fen­nel,


Herbs

But not that kind of herb, the NSA is out in force these days mak­ing sure the good cit­i­zens of Amer­ica aren’t par­tak­ing in any­thing par­tic­u­larly fun to off­set the ongo­ing eco­nomic mis­ery in their lives. No, these are herbs more like oregano, corian­der, sage and pars­ley all of which we planted on Sun­day. The


Early Spring Garden

Feb­ru­ary 10th, we set out the early gar­den for the spring. The weather here has been mild to say the least with the excep­tion of a week long cold snap in Jan­u­ary. We’ve had very few freezes, maybe 2 in all of Feb­ru­ary alone, no more than 10 for the win­ter I don’t think. Even


Travels In New Orleans

It was appar­ently not known that desire must be dammed up to be self-renewing.” Jacques Barzun Travel writ­ing is some­what meta­phys­i­cal in nature. I mean this in the sense that I am writ­ing about a place try­ing to con­vince you it is won­der­ful many times all the while try­ing to enjoy the place in ques­tion


On Adventure And Detachment

Dark spruce for­est frowned on either side of the frozen water­way. The trees had been stripped by a recent wind of their white cov­er­ing of frost, and they seemed to lean toward each other, black and omi­nous, in the fad­ing light. A vast silence reigned over the land. The land itself was a des­o­la­tion, life­less,


A Significant Place

I stand beside a grav­elly, sand packed road. I kneel down and touch the ground with my hand. The sun threat­ens to pound me into the ground, its blaz­ing rays like pieces of glass against my face. Breath­ing is dif­fi­cult here and the heat is chok­ing in its inten­sity. Yet small brown skinned chil­dren play


On Fundraising

Last week­end, I took part in Cross­Fit for Hope, a fundrais­ing event by Cross­Fit to raise money for St. Jude Children’s Research Hos­pi­tal. The goal across all par­tic­i­pants was $1.7 mil­lion, one day’s oper­at­ing costs for St. Jude. As with most things Cross­Fit, it revolved around a work­out aptly named Cross­Fit for Hope (we’re noth­ing


Please Don’t Learn To Speak French

This essay is a par­ody of this essay. You should read it as such. It will be of lit­tle inter­est to the great major­ity of my read­ers but there was no point in putting it on my rapidly dying tech­nol­ogy blog. Today (regard­less on which day you are read­ing this) on Twit­ter, a hun­dred or so