因为它的扩展没有建立,所以忽略了GEM [英] Ignoring GEM because its extensions are not built

查看:942
本文介绍了因为它的扩展没有建立,所以忽略了GEM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的工作和家用电脑上,我最近使用 ruby​​-install 将Ruby升级到了2.3.1。我使用 chruby 作为我的Ruby切换器。



我在终端上看到这个警告:

 忽略bcrypt-3.1.11,因为它的扩展没有被构建。试试:gem pristine bcrypt --version 3.1.11 
忽略bcrypt-3.1.10,因为它的扩展没有被构建。试试:gem pristine bcrypt --version 3.1.10
忽略binding_of_caller-0.7.2,因为它的扩展没有被构建。试试:gem pristine binding_of_caller --version 0.7.2
忽略byebug-9.0.5,因为它的扩展没有被构建。尝试:gem pristine byebug --version 9.0.5
忽略byebug-5.0.0,因为它的扩展没有构建。试试:gem pristine byebug --version 5.0.0
忽略concurrent-ruby-ext-1.0.2,因为它的扩展没有被构建。试试:gem pristine concurrent-ruby-ext --version 1.0.2
忽略debug_inspector-0.0.2,因为它的扩展没有构建。试试看:gem pristine debug_inspector --version 0.0.2

在我的电脑上,时间更长,但容易解决。当我试过建议的 gem pristine GEM 时,它告诉我找不到宝石,所以我跑了 gem install GEM

在我家里,没有任何东西可以工作。从常识和各种其他问题来看:




  • gem pristine GEM

  • gem pristine --all

  • 卸载并重新安装gem

  • gem update

  • gem update --system

  • 软件包更新

  • 卸载并重新安装 bundler

  • 卸载并重新安装 rails (但这不是Rails的特定问题。 >删除〜/ .bundle /

  • 打开 XCode 并让它安装一些扩展(它确实需要这样做,但它没有解决任何问题。)
  • 运行 brew doctor 并解决所有小问题,然后 brew更新 brew升级

  • gem install curb (我无法想象这个gem与这个问题有什么关系,但是两个不同的人将它列为他们修复相同警告的最后一步。)
  • >

解决方案

今天我遇到了这个确切的问题 - 获得这样的警告,甚至没有安装的宝石!



...那么,事实证明gem 已被安装 - 对于不同的ruby而言,我所设置的chruby 2.2.3 vs 2.3.1)。



切换到所有不同的ruby并运行 gem pristine --all 解决了所有这些问题。 / p>

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 seeing this warning in my terminal:

Ignoring bcrypt-3.1.11 because its extensions are not built.  Try: gem pristine bcrypt --version 3.1.11
Ignoring bcrypt-3.1.10 because its extensions are not built.  Try: gem pristine bcrypt --version 3.1.10
Ignoring binding_of_caller-0.7.2 because its extensions are not built.  Try: gem pristine binding_of_caller --version 0.7.2
Ignoring byebug-9.0.5 because its extensions are not built.  Try: gem pristine byebug --version 9.0.5
Ignoring byebug-5.0.0 because its extensions are not built.  Try: gem pristine byebug --version 5.0.0
Ignoring concurrent-ruby-ext-1.0.2 because its extensions are not built.  Try: gem pristine concurrent-ruby-ext --version 1.0.2
Ignoring debug_inspector-0.0.2 because its extensions are not built.  Try: gem pristine debug_inspector --version 0.0.2

On my work, computer, the list was much longer, but easy to resolve. When I tried the suggested gem pristine GEM, it told me it couldn't find the gem, so I ran gem install GEM, and that solved it.

At home, nothing is working.

Things I have tried, from common sense and various other Stack questions:

  • gem pristine GEM
  • gem pristine --all
  • uninstalling and reinstalling the gem
  • gem update
  • gem update --system
  • bundle update
  • uninstalling and reinstalling bundler
  • uninstalling and reinstalling rails (Though, it's not a Rails specific problem.)
  • deleting ~/.bundle/
  • opening XCode and letting it install some extensions (It did need to do it, but it didn't fix anything.)
  • running brew doctor and solving all the minor issues, then brew update and brew upgrade
  • gem install curb (I can't imagine what this gem has to do with this issue, but two different people listed it as the last step of their fix to the same warning.)

解决方案

I came across this exact issue today - getting warnings like this for gems that weren't even installed!

... Well, it turns out the gems were installed - for a different ruby than the one I had set active with chruby (2.2.3 vs 2.3.1).

Switching to all the different rubies and running gem pristine --all on all of them solved the problem.

这篇关于因为它的扩展没有建立,所以忽略了GEM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆