Ignoring GEM because its extensions are not built

前端 未结 18 1377
陌清茗
陌清茗 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:16

    I've had this problem today too and it frustrated because I couldn't type because my whole editor flashed red with error messages.

    I'm not entirely sure what exactly caused it but I believe it's because we have multiple ruby versions OR multiple ruby version managers installed and they overwrite each other and otherwise mess up your paths towards the gems.

    The gem command also gets overwritten when you have rbenv and rvm.

    See which ones you've installed by typing;

    which rvm
    which rbenv
    which chruby
    

    If one of those is installed it'll return a path. Then delete them, make sure to completely clean out all the directories and start with a clean install.


    Remove

    Here's what I did for rvm;

    rvm implode
    gem uninstall rvm
    rm -rf ~/.rvm
    rm -rf ~/.rvmrc
    

    Here's what I did for rbenv

    First installed https://github.com/meowsus/rbenv-clean, then

    rbenv clean
    sudo apt-get remove rbenv
    rm -rf ~/.rbenv
    

    Reinstall

    Then you have a clean home directory to work from. I reïnstalled rbenv with How to install Ruby 2.1.4 on Ubuntu 14.04. And finally;

    rbenv rehash
    

提交回复
热议问题