Bundle update fails on ffi

后端 未结 11 1815
闹比i
闹比i 2020-12-05 14:11

I\'m attempting to do a bundle update on my rails application but I get the following error:

Installing ffi (1.0.11) with native extensions Unfo         


        
相关标签:
11条回答
  • 2020-12-05 14:18

    Just in case try to run

    sudo /usr/bin/gcc

    You'll probably see license agreement, so scroll thgough it, type "agree" and try to install gem again.

    0 讨论(0)
  • 2020-12-05 14:21

    Mac OSx 10.10.2 yosemite

     CC=/usr/bin/i686-apple-darwin11-llvm-gcc-4.2 gem install ffi
    

    and thats it -check that you have 4.2 compiler in /usr/bin that you can hook into

    ls /usr/bin|grep gcc|grep 4.2
    

    You do not have to wipe out all of your local gems or override symlinks to do this - its a waste of time and will likely create more problems then it solves.

    please note, your bin path may be different if you needed to install via brew

    brew install apple-gcc42 
    
    0 讨论(0)
  • 2020-12-05 14:27

    Please note:

    If you have recently updated Xcode, you may just need to open Xcode and accept the latest agreement.

    I had the same issue and had recently installed an update to Xcode (v6.1) and solved it with these steps:

    1. open Xcode
    2. accept new agreement
    3. rerun bundle update
    0 讨论(0)
  • 2020-12-05 14:29

    For me I just didn't have gcc installed, solve in Ubuntu by:

    sudo apt install build-essential
    
    0 讨论(0)
  • 2020-12-05 14:30

    For Xcode 5 and later:

    $ xcode-select --install
    

    to install the Command Line Tools.

    0 讨论(0)
  • 2020-12-05 14:31

    I ran into a problem similar to this yesterday.

    I was able to resolve it using these steps:

    https://github.com/carlhuda/bundler/blob/1-0-stable/ISSUES.md

    Essentially, there was a problem with my bundle and clearing things out and rebuilding things from scratch resolved it.

    The steps are repeated here:

    # remove user-specific gems and git repos
    rm -rf ~/.bundle/ ~/.gem/
    
    # remove system-wide git repos and git checkouts
    rm -rf $GEM_HOME/bundler/ $GEM_HOME/cache/bundler/
    
    # remove project-specific settings and git repos
    rm -rf .bundle/
    
    # remove project-specific cached .gem files
    rm -rf vendor/cache/
    
    # remove the saved resolve of the Gemfile
    rm -rf Gemfile.lock
    
    # try to install one more time
    bundle install
    

    Although, given the message in the output text:

    You have to install development tools first.

    That makes me think you just may not have installed the Apple Xcode Developer Tools. Have you checked that? (I believe they're available in the Mac App Store.)

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