在我的工作和家用计算机上,我最近将 Ruby 升级到 2.3.1,使用ruby-install. 我chruby用作我的 Ruby 切换器。
ruby-install
chruby
我开始在终端中看到此警告:
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 install GEM
在家里,没有任何工作。
根据常识和其他各种堆栈问题,我尝试过的事情:
gem pristine --all
gem update
gem update --system
bundle update
bundler
rails
~/.bundle/
XCode
brew doctor
brew update
brew upgrade
gem install curb
我今天遇到了这个确切的问题 - 甚至没有安装的 gem 收到这样的警告!
…好吧,事实证明,gem 已 安装 - 与我使用 chruby(2.2.3 与 2.3.1)设置的激活的 ruby 不同。
切换到所有不同的红宝石并gem pristine --all在所有红宝石上运行解决了这个问题。