忽略 GEM,因为它的扩展未构建 [英] Ignoring GEM because its extensions are not built

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

问题描述

在我的工作和家用计算机上,我最近使用 ruby-install 将 Ruby 升级到了 2.3.1.我使用 chruby 作为我的 Ruby 切换器.

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

在我的工作计算机上,列表要长得多,但很容易解决.当我尝试建议的 gem pristine GEM 时,它告诉我找不到 gem,所以我运行了 gem install GEM,然后就解决了.

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
  • gem pristine --all
  • 卸载并重新安装 gem
  • 宝石更新
  • gem 更新 --system
  • 捆绑更新
  • 卸载并重新安装 bundler
  • 卸载并重新安装 rails(不过,这不是 Rails 特有的问题.)
  • 删除~/.bundle/
  • 打开 XCode 并让它安装一些扩展(它确实需要这样做,但它没有解决任何问题.)
  • 运行 brew doctor 并解决所有小问题,然后运行 ​​brew updatebrew upgrade
  • gem install cream(我无法想象这个 gem 与这个问题有什么关系,但是两个不同的人将它列为他们修复同一警告的最后一步.)
  • 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.)

推荐答案

我今天遇到了这个确切的问题 - 甚至没有安装的 gem 收到这样的警告!

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

...好吧,事实证明宝石已安装 - 与我设置为激活的 chruby 不同的 ruby​​(2.2.3 与 2.3.1).

... 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).

切换到所有不同的红宝石并在所有红宝石上运行 gem pristine --all 解决了问题.

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

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

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