Upgrading To Mountain Lion, PostgreSQL and Rails

I’m probably late to the party on this since Mountain Lion has been out for an internet eternity but if I ever have to do it again or if someone is a worse procrastinator than me, this will live in perpetuity in the Googleverse to aid us on out travels.

I upgraded to Mountain Lion this weekend and several things immediately went wrong. I’ve already forgotten a couple (which is why I’m writing this) but the one I ran into last night involved creating a new Rails site using PostgreSQL. When I did a “rails new”, I received the following 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:
/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.

Several StackOverflow posts led me in different directions but eventually, I stumbled onto the following which worked: Install latest XCode, upgrading postgres using homebrew (if you aren’t using HomeBrew, you’re really making life hard for yourself) and then running bundle install again on the new rails app.

An Experiment in Permaculture

So in my travels through the internet and gardening websites and forums, I stumbled across Permies. From there, I learned about Hugelkultur which is a way to build raised beds using old wood that eventually rots away all forest-like into what is supposedly an extremely drought tolerant garden bed. Those words “drought tolerant” caught my eye and as with most things gardening, I was interested in giving it a try.

However, I didn’t have access to any old wood right off hand and also since this was an experiment, I went a slightly different direction. Haven’t built no-dig gardens before with layers of straw and alfalfa, I thought bales of alfalfa might be a good substitute for the wood of a traditional hugelkultur bed. Now it may turn out that alfalfa provides entirely too much nitrogen as it decomposes but we’ll see.

I would put a picture of my bed right here but for some reason WordPress doesn’t like the photo I keep trying to upload. So suffice it to say, it’s 20 feet long and 4 feet wide with two alfalfa bales right in the middle. We covered that up with 2000 pounds of dirt from Home Depot (yes, really, 2000 pounds. 2000 pounds in 40lb bags makes for a lot of lifting and pouring. We’re stronger than we were last Friday.)

Into this bed went 10 tomatoes and then 6 pepper plants. However, knowing what little I do about permaculture now, I know that open soil is the worst thing that can happen to a garden bed. So tonight, I went through and randomly planted seeds of spaghetti squash, 8 ball squash, radishes, lima beans and marigolds. If I had any green beans, I would have added them along with the kitchen sink. Hopefully after we get rain tonight, things will start to sprout into a crazy cacophony of veggies and flowers. Or it all may wash away if it really rains.

The potatoes are really starting to take off now after 2 months in the ground. I planted them in the keyhole garden this year which is 3 feet tall and really allows me to pile dirt up around them as they grow. I haven’t ever had a lot of luck with potatoes but I think this may be the year for success.

We’re harvesting some cool weather veggies like green onions, broccoli (which always seems to go to seed far too fast in my garden) and collards. Soon the sugar snap peas will be ready and will go nicely with the marjoram growing in the herb garden. I’ll probably build a cucumber trellis Friday night and put pickling and slicing cucumbers in the ground. In another month, it will be time for okra, eggplant, southern peas and sweet potatoes. I was hoping to plant pumpkins this year but the only available spot is the same bed that ALWAYS has squash bugs so will probably skip it this year. If the permaculture bed doesn’t work out, it may become a pumpkin bed next year.

Garden Update

Weekend event: Heard Museum plant sale, first weekend of the McKinney Farmer’s Market

Weekend tasks: Added 2000 pounds of soil and compost to the north veggie bed to plant it with tomatoes and peppers; planted everything we bought at the Heard Museum plant sale including bee balm, mexican hat, lavender, hot and spicy oregano, fennel, blackfoot daisy and guara; dug up the pomegranate tree blocking the bench, fertilized the lawn, peach tree and blackberry bush; mowed for the first time;

Harvested: three heads of broccoli, swiss chard left over from last year, collards.