Ruby on Rails安装gem puma错误

时间:2018-09-25 20:42:22

标签: ruby-on-rails ruby rubygems

错误:[rake --tasks] /Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/resolver.rb:286:in block in verify_gemfile_dependencies_are_found!': Could not find gem 'puma (~> 3.11)' in any of the gem sources listed in your Gemfile. (Bundler::GemNotFound) from /Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/resolver.rb:254:in '     从/Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/resolver.rb:254:in verify_gemfile_dependencies_are_found!' from /Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/resolver.rb:48:in开始     来自/Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/resolver.rb:22:在resolve' from /Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/definition.rb:258:in中解析”     来自/Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/definition.rb:171:in specs' from /Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/definition.rb:238:in specs_for'     来自/Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/definition.rb:227:in requested_specs' from /Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:108:in中的definition_method中的'     来自/Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:20:in setup' from /Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler.rb:107:in setup'     来自/Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/setup.rb:20:<top (required)>' from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in中要求     来自/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in rescue in require' from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:39:in require'     来自/Users/abhisumishra/RubymineProjects/untitled5/config/boot.rb:3:在<top (required)>' from /Users/abhisumishra/RubymineProjects/untitled5/bin/rake:2:in require_relative'中     来自/ Users / abhisumishra / RubymineProjects / untitled5 / bin / rake:2:在verify_gemfile_dependencies_are_found中的<main>' Error:[rake --prereqs] /Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/resolver.rb:286:in块中!':在Gemfile中列出的任何宝石来源中都找不到宝石'puma(〜> 3.11)' 。 (捆绑器:: GemNotFound)     来自/Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/resolver.rb:254:位于each' from /Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/resolver.rb:254:in verify_gemfile_dependencies_are_found中!”     来自/Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/resolver.rb:48:in start' from /Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/resolver.rb:22:in resolve'     来自/Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/definition.rb:258:in resolve' from /Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/definition.rb:171:in specs'     来自/Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/definition.rb:238:in specs_for' from /Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/definition.rb:227:in requested_specs'     来自/Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:108:in block in definition_method' from /Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:20:in setup'     来自/Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler.rb:107:in setup' from /Users/abhisumishra/.gem/ruby/2.3.0/gems/bundler-1.16.5/lib/bundler/setup.rb:20:in'     来自/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in require' from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in中的急需服务'     来自/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:39:in require' from /Users/abhisumishra/RubymineProjects/untitled5/config/boot.rb:3:in'     来自/ Users / abhisumishra / RubymineProjects / untitled5 / bin / rake:2:in require_relative' from /Users/abhisumishra/RubymineProjects/untitled5/bin/rake:2:in' 这些是我在尝试安装滑轨时遇到的错误。请帮忙。

2 个答案:

答案 0 :(得分:0)

我相信安装Ruby Gem puma应该可以解决您的问题。

致谢。

答案 1 :(得分:0)

在这种情况下,第一行是您的错误。看起来您在代码或gemfile中需要使用puma(或...您需要的pem之一依赖于puma)。

您应该将puma版本3.11添加到您的gemfile中,然后运行bundle-install将所有内容安装到gemfile中。