Yikes. As I was working on my Ruby on Rails freelance project (called Skqueak.com, it is an awesome app for iPhone, you should check it out if you have time) today, and encountered a head scratcher. While running bundle install, my gem install started failing, like “Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.” and Bundler quits. Further digging into error logs, it turns out that I was getting this error:
sh: make: command not found
Geez. Do I not have make? which make in the command line gets no response.
I’ve upgraded to Mountain Lion sometimes in September, and I guess many things have changed. Like built-in web server (More on this later.). But losing make? That is a little unsettling.
Did I ever mention I love StackOverflow? It is a great place to find people who are having the same kind of problem. Case in point: “sh: make: command not found” when running “$ bundle” after adding redcarpet gem to Rails app.
Sounds like I need to install the latest version of Xcode — 4.5.1 at the moment. You can get it from Apple’s App Store. It is a whopping 1.6 GB large, though. I may need a faster internet… (NOTE: I first tried to download both XCode and its command line tools from this link, but App Store rout worked out better for me.)
I installed it, restarted the machine, but the same result. which make in the command line still gets no response.
More StackOverflow reading (Thank you StackOverflow contributors, you make internet great!): Upgrading to Mountain Lion and XCode 4 broke my “make”? and installing “make” on Mac tells me that I need to enabled command line tools. XCode -> Preferences, then this:

Click on “Install” next to Command Line Tools (115.6 MB).
Would that do it?
Yay, command which make will now return /usr/bin/make, and my bundle is complete!
Thank goodness.
—
One other little annoyance in Mountain Lion is that there is no longer “Web Sharing.” Web sharing was an awesome way to create local testing environment on Mac, but for some reason, (probably security issues) they have disabled this. MacFixIt (now cnet) has a nice article on “How to enable Web Sharing in OS X Mountain Lion”, but I decided to go with MAMP. This way it is easier to control the entire machine’s web in one place — I set the home directory’s “Sites” folder to be root of MAMP, viewable by accessing localhost:8888, and I tend to work on WordPress themes and other database driven sites (JapaneseBallPlayers.com redesign is coming! … When I get to it… and I like to transform BaseballHackDay.com to be more useful full-resource site, much like datavisualization.ch… if I have time). Easy access to MyPhpAdmin is pretty sweet — just by visiting localhost:8888/MAMP/phpmyadmin — and if you know that you’ll be using php, you don’t have to manually activate php on the Mac OSX server, even though it is bundled.

7 Comments
This was a big help to me Diago, thank you!!!
Thank you so much for this post. Exactly what I needed!
great tip! saved me a bunch of “hit head here” time.
Thank you so much. Saved me a lot of headache :)
Thank you, I thought I had broken something…
Thank you, this was exactly what I was looking for!
Nice..solved my problem…