我想感谢所有回答我问题的人... 我正在启动一个新的Rails项目,但在运行“ rails generate rspec:install”时会遇到此问题。
Ignoring bindex-0.5.0 because its extensions are not built. Try: gem
pristine bindex --version 0.5.0
Ignoring bootsnap-1.3.2 because its extensions are not built. Try: gem
pristine bootsnap --version 1.3.2
Ignoring byebug-10.0.2 because its extensions are not built. Try: gem
pristine byebug --version 10.0.2
/Library/Ruby/Gems/2.3.0/gems/bundler-
1.16.6/lib/bundler/spec_set.rb:91:in `block in materialize': Could not
find nokogiri-1.8.5 in any of the sources (Bundler::GemNotFound)
from /Library/Ruby/Gems/2.3.0/gems/bundler- 1.16.6/lib/bundler/spec_set.rb:85:in `map!'
from /Library/Ruby/Gems/2.3.0/gems/bundler-1.16.6/lib/bundler/spec_set.rb:85:in `materialize'
from /Library/Ruby/Gems/2.3.0/gems/bundler-1.16.6/lib/bundler/definition.rb:171:in `specs'
from /Library/Ruby/Gems/2.3.0/gems/bundler-1.16.6/lib/bundler/definition.rb:238:in `specs_for'
from /Library/Ruby/Gems/2.3.0/gems/bundler-1.16.6/lib/bundler/definition.rb:227:in `requested_specs'
from /Library/Ruby/Gems/2.3.0/gems/bundler-1.16.6/lib/bundler/runtime.rb:108:in `block in definition_method'
from /Library/Ruby/Gems/2.3.0/gems/bundler-1.16.6/lib/bundler/runtime.rb:20:in `setup'
from /Library/Ruby/Gems/2.3.0/gems/bundler-1.16.6/lib/bundler.rb:107:in `setup'
from /Library/Ruby/Gems/2.3.0/gems/bundler-1.16.6/lib/bundler/setup.rb:20:in `<top (required)>'
from /Users/stanleychoo/.rbenv/versions/2.3.7/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/stanleychoo/.rbenv/versions/2.3.7/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/stanleychoo/Public/todos-api/vendor/bundle/gems/spring-2.0.2/lib/spring/commands.rb:33:in `<module:Spring>'
from /Users/stanleychoo/Public/todos-api/vendor/bundle/gems/spring-2.0.2/lib/spring/commands.rb:4:in `<top (required)>'
from /Users/stanleychoo/.rbenv/versions/2.3.7/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/stanleychoo/.rbenv/versions/2.3.7/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/stanleychoo/Public/todos-api/vendor/bundle/gems/spring-2.0.2/lib/spring/server.rb:9:in `<top (required)>'
from /Users/stanleychoo/.rbenv/versions/2.3.7/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/stanleychoo/.rbenv/versions/2.3.7/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/stanleychoo/Public/todos-api/vendor/bundle/gems/spring-2.0.2/lib/spring/client/server.rb:9:in `call'
from /Users/stanleychoo/Public/todos-api/vendor/bundle/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
from /Users/stanleychoo/Public/todos-api/vendor/bundle/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
from /Users/stanleychoo/Public/todos-api/vendor/bundle/gems/spring-2.0.2/bin/spring:49:in `<main>'
我已经安装了gem的特定版本,并在控制台上运行了命令-'gem pristine --all','gem pristine bindex --version 0.5.0','gem pristine bootsnap --version 1.3.2', '宝石原始byebug --version 10.0.2'
但是我的努力没有改变 从错误消息中,我注意到我的宝石在 /Users/stanleychoo/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0代替/Users/stanleychoo/.rbenv/versions/2.3.7/lib/ruby/2.3.0/rubygems/core_ext
谢谢。