Gem :: Specification:Class的未定义方法`stubs_for'(NoMethodError) [英] undefined method `stubs_for' for Gem::Specification:Class (NoMethodError)

查看:109
本文介绍了Gem :: Specification:Class的未定义方法`stubs_for'(NoMethodError)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这些天来,我试图使用一个最小错误主题来构建我的github博客.

these days, I have tried to build my github blog using a minimal-mistakes theme.

在最后的快速指南中有说

at the last Quick guide there are saying

bundle exec jekyll serve

结果

`find_name': undefined method `stubs_for' for Gem::Specification:Class (NoMethodError)

特定

C:\Users\all7j\Documents\project\elephantoid.github.io>bundle exec jekyll serve
Traceback (most recent call last):
        21: from C:/Ruby26-x64/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        20: from C:/Ruby26-x64/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        19: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/setup.rb:10:in `<top (required)>'
        18: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/ui/shell.rb:88:in `silence'
        17: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/ui/shell.rb:136:in `with_level'
        16: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/setup.rb:10:in `block in <top (required)>'
        15: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler.rb:149:in `setup'
        14: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:20:in `setup'
        13: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:101:in `block in definition_method'
        12: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/definition.rb:226:in `requested_specs'
        11: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/definition.rb:237:in `specs_for'
        10: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/definition.rb:170:in `specs'
         9: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/definition.rb:258:in `resolve'
         8: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/definition.rb:268:in `index'
         7: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/index.rb:11:in `build'
         6: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/definition.rb:271:in `block in index'
         5: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/definition.rb:271:in `each'
         4: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/definition.rb:273:in `block (2 levels) in index'
         3: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/source/metadata.rb:7:in `specs'
         2: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/index.rb:11:in `build'
         1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/source/metadata.rb:28:in `block in specs'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/rubygems_integration.rb:623:in `find_name': undefined method `stubs_for' for Gem::Specification:Class (NoMethodError)
Did you mean?  stubs

我找不到存根.

我不知道这是什么问题...我只是按照快速指南中的步骤进行操作.

and I don't know what is the problem... I just follow the Quick guide steps.

我在Windows上安装了gem,ruby,bundler.并分叉GitHub,更新_config.yml和其他内容...

I had install gem, ruby, bundler on windows. and fork GitHub, update _config.yml and more things...

推荐答案

我有一个类似的案例,该案例是通过 passenger.log 提交给我的:

I had a similar case which was brought to me through passenger.log:

[ 2020-12-07 20:13:44.4960 18738/7f0b659e8700 agents/HelperAgent/RequestHandler.h:2306 ]: [Client 19] Cannot checkout session because a spawning error occurred. The identifier of the error is e907d6aa. Please see earlier logs for details about the error.
App 19579 stdout: 
App 19579 stdout: 
[ 2020-12-07 20:13:54.2571 18738/7f0b67e7c700 Pool2/Implementation.cpp:287 ]: Could not spawn process for application /data/appname/current: An error occured while starting up the preloader.
  Error ID: 61ed637e
  Error details saved to: /tmp/passenger-error-x96ujc.html
  Message from application: undefined method `stubs_for' for Gem::Specification:Class (NoMethodError)

在我的情况下,这是rubygems版本的更改.根据您的应用程序和期望的版本,您想在下面适当地替换它:

In my case it was a rubygems version change. Depending on your application and expected version you'd like to replace it appropriately below:

gem install -v 2.7.7 rubygems-update && gem update --system 2.7.7

您可能还想在重新安装之前卸载以前的rubygems-update:

You may also want to uninstall previous rubygems-update prior to re-installation:

gem uninstall rubygems-update

Select gem to uninstall:
 1. rubygems-update-2.4.8
 2. rubygems-update-2.6.13
 3. All versions
> 3
Successfully uninstalled rubygems-update-2.4.8
Remove executables:
    update_rubygems

in addition to the gem? [Yn]  y
Removing update_rubygems
Successfully uninstalled rubygems-update-2.6.13

以及相应文件夹的清除:

and a cleanup of the corresponding folder:

rm -f /usr/local/bin/update_rubygems

您想将其翻译为Windows计算机的位置/命令

You'd like to translate those to your windows machine locations/commands

这篇关于Gem :: Specification:Class的未定义方法`stubs_for'(NoMethodError)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆