如何解决“依赖错误:Yikes!看起来你没有安装bunto-sitemap”。在Windows上?

时间:2017-04-23 15:40:16

标签: ruby rubygems

  

我正在尝试在我的Windows 10计算机上使用Bunto,但我收到 依赖性错误

错误

这里是输出(错误):

newset = set(c)
print(new_set)

我的环境

这是我的Ruby和Gems版本:

> bundle exec bunto serve
Configuration file: C:/Users/Aahash/Downloads/aahash.tk/_config.yml
  Dependency Error: Yikes! It looks like you don't have bunto-sitemap or one of its dependencies installed. In order to use Bunto as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- bunto-sitemap' If you run into trouble, you can find helpful resources at https://buntowaf.tk/help/!
bunto 3.2.1 | Error:  bunto-sitemap

代码

我的> ruby -v ruby 2.3.0p0 (2015-12-25 revision 53290) [x64-mingw32] > gem -v 2.6.8

Gemfile

输出

这是我source "https://rubygems.org" ruby RUBY_VERSION gem 'bunto' 的输出:

bundle install

如何修复此错误?提前谢谢!

2 个答案:

答案 0 :(得分:1)

您忘记在gem 'bunto-sitemap'中添加Gemfile了!

您还应该使用Windows Directory Monitor (WDM)宝石!

  

信息: Windows目录监视器(WDM)是一个线程安全的ruby库,可用于监视Windows上的更改目录。它主要在C中实现,并使用Win32 API获得更好的性能!

更改Gemfile中的内容:

source "https://rubygems.org"
ruby RUBY_VERSION

gem 'bunto'

到此:

source "https://rubygems.org"
ruby RUBY_VERSION

gem 'bunto'
gem 'bunto-sitemap'

## Please add the following to your Gemfile to avoid polling for changes:
gem 'wdm', '>= 0.1.0' if Gem.win_platform?

答案 1 :(得分:0)

我对不同的宝石有同样的问题,如果安装了宝石,那么无论是什么原因捆绑都没有拿起它。

要确保捆绑包识别它,请尝试使用以下命令:

sudo bundle add bunto-sitemap

之后检查捆绑包,如果它现在显示在那里尝试您尝试再次运行的操作。它应该