在我的工作和家用计算机上,我最近将 Ruby 升级到 2.3.1,使用ruby-install
. 我chruby
用作我的 Ruby 切换器。
我开始在终端中看到此警告:
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 install GEM
,解决了它。
在家里,没有任何工作。
我尝试过的事情,来自常识和其他各种堆栈问题:
gem pristine GEM
gem pristine --all
- 卸载并重新安装 gem
gem update
gem update --system
bundle update
- 卸载并重新安装
bundler
- 卸载并重新安装
rails
(虽然,这不是 Rails 特定的问题。) - 删除
~/.bundle/
- 打开
XCode
并让它安装一些扩展(它确实需要这样做,但它没有解决任何问题。) - 运行
brew doctor
并解决所有小问题,brew update
然后brew upgrade
gem install curb
(我无法想象这个 gem 与这个问题有什么关系,但是两个不同的人将它列为他们修复同一警告的最后一步。)