“sh: make: command not found” when running “$ bundle” after adding redcarpet gem to Rails app

后端 未结 6 902
失恋的感觉
失恋的感觉 2021-02-08 12:29

I\'m getting the following when running \"$ bundle\" after adding \"gem \'redcarpet\'\" to Gemfile:

$ bundle
...
Using paperclip (2.3.11) 
Using passenger (3.0.7         


        
相关标签:
6条回答
  • 2021-02-08 13:01

    You simply need to install make!

    RHEL-based:

    yum install make

    Debian-based

    apt-get install make

    0 讨论(0)
  • 2021-02-08 13:04

    I had the same problem after upgrading to OS X Lion. I updated X Code to 4.1 and everything was better!

    0 讨论(0)
  • 2021-02-08 13:08

    I had the same problems after a Time Machine update. Installing Xcode and the along coming developer tools fixed that issue.

    0 讨论(0)
  • 2021-02-08 13:19

    FYI, you need to run the "Install Xcode" app if you downloaded it from the Appstore on a Lion in order to finish the install. Seems silly, but I missed it.

    0 讨论(0)
  • 2021-02-08 13:21

    Same issue aftering updating to Mountain Lion. You need to get the new command line tools and run:

    sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer 
    

    Src: Upgrading to Mountain Lion and XCode 4 broke my "make"?

    If after this you still get an error like this:

    make: /usr/bin/gcc-4.2: No such file or directory
    

    A symlink will sort out that issue:

    sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
    

    As one of the comments on this post states.

    It might not be the best solution but it works, there's surely something else to it.

    0 讨论(0)
  • 2021-02-08 13:23

    If you have Mountain Lion and XCODE 4.4.1 you have to go here https://developer.apple.com/downloads/index.action and download the command line tool (it's free so you don't have to pay for iOS or MAC developer program) to download this tool.

    It works for me.

    0 讨论(0)
提交回复
热议问题