首页 文章

在任何来源中找不到rake-12.2.1(Bundler :: GemNotFound)

提问于
浏览
0

运行 rails g controller 命令后,我得到这是我的错误:

无法在任何来源中找到rake-12.2.1(Bundler :: GemNotFound)/usr/lib/ruby/vendor_ruby/bundler/spec_set.rb:87:in block in materialize':找不到rake-12.2 . 来自/usr/lib/ruby/vendor_ruby/bundler/spec_set.rb:81:inmap!的任何来源(Bundler :: GemNotFound)中的1个!来自/usr/lib/ruby/vendor_ruby/bundler/spec_set.rb:81:in materialize'来自/ usr / lib / ruby / vendor_ruby的/usr/lib/ruby/vendor_ruby/bundler/definition.rb:159:inspecs' /bundler/definition.rb:218:in specs_for'来自/usr/lib/ruby/vendor_ruby/bundler/definition.rb:207:in requested_specs'来自/usr/lib/ruby/vendor_ruby/bundler/runtime.rb:109 :来自/ usr / lib,来自/usr/lib/ruby/vendor_ruby/bundler/runtime.rb:21:insetup',来自/ usr / lib,来自/usr/lib/ruby/vendor_ruby/bundler.rb:101:in setup /ruby/vendor_ruby/bundler/setup.rb:20:in来自/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in require'from / usr / local / lib / site_ruby / 1.9.1 / rubygems / core_ext / kernel_require.rb:55:in require'from /root/Desktop/blog/vendor/bundle/ruby/2.3.0/gems/spring-2.0.2/lib/spring/commands .rb:33:in <module:Spring>'from /root/Desktop/blog/vendor/bundle/ruby/2.3.0/gems/spring-2.0.2/lib/spring/commands.rb:4:in'来自/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55 :在'from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in require'from /root/Desktop/blog/vendor/bundle/ruby/2.3.0/gems /spring-2.0.2/lib/spring/server.rb:9:in <top(required)>'from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in要求'来自/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in require'来自/root/Desktop/blog/vendor/bundle/ruby/2.3.0/gems/spring -2.0.2 / lib / spring / client / server.rb:9:in call'from /root/Desktop/blog/vendor/bundle/ruby/2.3.0/gems/spring-2.0.2/lib/spring/ client / command.rb:7:在调用'from /root/Desktop/blog/vendor/bundle/ruby/2.3.0/gems/spring-2.0.2/lib/spring/client.rb:30:in run'来自/root/Desktop/blog/vendor/bundle/ruby/2.3.0/gems/spring-2.0.2/bin/spring:49:in`'

1 回答

  • 1

    我遇到过同样的问题 . 我通过选择不同版本的ruby SDK来修复它 . 在我的情况下,它是通过选择2.4.2而不是2.3.3我相信默认安装在mac os上 .

相关问题