“sh: make: command not found”? and other Mountain Lion issues

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.

This entry was posted in Linux, Mac, and LAMP Open Source, Web/Print Design and Dev. Bookmark the permalink. Trackbacks are closed, but you can post a comment.

7 Comments

  1. Posted Wednesday, November 14, 2012 at 11/14/2012 @ 12:52 am | Permalink

    This was a big help to me Diago, thank you!!!

  2. Posted Sunday, November 25, 2012 at 11/25/2012 @ 4:27 pm | Permalink

    Thank you so much for this post. Exactly what I needed!

  3. Posted Monday, December 31, 2012 at 12/31/2012 @ 12:06 pm | Permalink

    great tip! saved me a bunch of “hit head here” time.

  4. Posted Tuesday, January 15, 2013 at 01/15/2013 @ 8:16 am | Permalink

    Thank you so much. Saved me a lot of headache :)

  5. Posted Tuesday, January 29, 2013 at 01/29/2013 @ 10:12 pm | Permalink

    Thank you, I thought I had broken something…

  6. Laura
    Posted Friday, March 29, 2013 at 03/29/2013 @ 1:51 pm | Permalink

    Thank you, this was exactly what I was looking for!

  7. Amit Desai
    Posted Thursday, April 11, 2013 at 04/11/2013 @ 1:20 am | Permalink

    Nice..solved my problem…

Leave a Reply

  • Welcome to Daigo’s Daily Digital Diorama. I blog about... whatever that comes to my mind.
  • Change color

    Purple Red Green Blue No Style

  • Archives

  • Calendar

    October 2012
    M T W T F S S
    « Sep   Nov »
    1234567
    891011121314
    15161718192021
    22232425262728
    293031  
  • Categories