繁体   English   中英

在Spacemacs中转到黄瓜步骤定义会引发异常:“无法加载此类文件-小黄瓜”

[英]Go to cucumber step definition in Spacemacs throws an exception: “Can not load such file — gherkin”

我有一个ruby on rails项目,其中的功能说明写在黄瓜上,我试图在我的Spacemacs(Emacs)中设置功能模式,以便能够进行黄瓜步骤定义。 在该项目中,我们使用的是gherkin 4.0版,我相信,导致我的错误的原因可能是我需要安装另一个版本的gherkin,Spacemacs功能模式才能正常工作。 不过,与此同时,我还需要为该项目安装4.0版本。

我尝试从本地Gemfile使用bundler bundle install gherkin版本4.0: bundle install并使用gem install命令在全局安装gherkin版本2.11.8: gem install gherkin -v 2.11.8

不幸的是,没有帮助:(

堆栈:红宝石,erb,rails,黄瓜,rspec,spacemacs(emacs),

我遇到了同样的问题,发现在feature-mode/support/find_step.rb的gem版本中, feature-mode/support/find_step.rb不够。 较新版本的Gherkin似乎会引发异常。 我的解决方法如下:

首先安装此版本的小黄瓜

gem install gherkin --version 2.11.8

then in spacemacs do the following command:

spc h d p feature-mode

open the package and navigate to support/find_step.rb

change
gem 'gherkin', '>= 2.11.8'
to
gem 'gherkin', '2.11.8'

save the file, and the feature-goto-step-definition function should work again

该包裹可能不再维护,需要回家。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM