Ignoring GEM because its extensions are not built

前端 未结 18 1360
陌清茗
陌清茗 2020-12-04 06:35

On both my work and home computers, I recently upgraded Ruby to 2.3.1, using ruby-install. I use chruby as my Ruby switcher.

I started seei

18条回答
  •  粉色の甜心
    2020-12-04 07:07

    Adding my own flavor here. I use rbenv installed via Homebrew and was getting four of these "ignoring... extensions not built" messages. Specifically:

    Ignoring bcrypt-3.1.12 because its extensions are not built.  Try: gem pristine bcrypt --version 3.1.12
    Ignoring bindex-0.5.0 because its extensions are not built.  Try: gem pristine bindex --version 0.5.0
    Ignoring bootsnap-1.3.2 because its extensions are not built.  Try: gem pristine bootsnap --version 1.3.2
    Ignoring byebug-10.0.2 because its extensions are not built.  Try: gem pristine byebug --version 10.0.2
    

    I tried many things in this thread with no luck. Finally in my case I did:

    • brew uninstall rbenv
    • rm -rf ~/.rbenv
    • brew install rbenv

    At this point I was still getting the errors, but now I had only a single Ruby version to contend with:

    $ rbenv versions
    * system (set by /Users/will/.rbenv/version)
    

    At this point I tried sudo gem pristine --all but was rejected for permissions on the system Gems directory.

    So I went through and ran pristine on each gem, like

    sudo gem pristine bcrypt --version 3.1.12 (etc)

    And finally the errors were gone.

提交回复
热议问题