我需要一点帮助。我该如何解决这个问题?
当我调用 cucumber
时,出现以下错误:
*** WARNING: You must use ANSICON 1.31 or higher (https://github.com/adoxa/ansic
on/) to get coloured output on Windows
WARNING: cannot load such file -- 2.2/gherkin_lexer_en
Couldn't load 2.2/gherkin_lexer_en
The $LOAD_PATH was:
lib
C:/Ruby22/lib/ruby/gems/2.2.0/gems/cucumber-1.3.19/bin/../lib
C:/Ruby22/lib/ruby/gems/2.2.0/gems/builder-3.2.2/lib
C:/Ruby22/lib/ruby/gems/2.2.0/gems/diff-lcs-1.2.5/lib
C:/Ruby22/lib/ruby/gems/2.2.0/gems/multi_json-1.11.0/lib
C:/Ruby22/lib/ruby/gems/2.2.0/gems/gherkin-2.12.2-x86-mingw32/lib
[...]
系统:
- Windows 8.1 x64
- Ruby 2.2.1 安装程序
我得到了答案: https://github.com/cucumber/cucumber/issues/830#issuecomment-90837546
I'm afraid Cucumber on Windows/Ruby requires ruby 2.0.0 (x86). The reason is that the gherkin gem doesn't yet ship with compiled binaries for more recent versions or Ruby, and not for x64.
We're working on a Gherkin3 which will address this issue. See this post for background. I cannot give you an ETA, but it's at least a few months away.
最佳答案
- 我从 http://rubyinstaller.org/downloads/ 下载 Ruby 2.0 x86
- 安装exe
- cmd 中的命令:
gem install calabash-android
错误:安装 calabash-android 时出错: “json” native gem 需要安装构建工具。
- 从http://rubyinstaller.org/downloads/下载DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe
- 将 DevKit 解压到路径 C:\Ruby200\DevKit
- 运行 cd C:\Ruby200\DevKit
- 运行 ruby dk.rb init
- 运行 ruby dk.rb 审核
- 运行 ruby dk.rb 安装
- 然后再次使用命令
gem install calabash-android
关于ruby - 无法加载此类文件 -- 2.2/gherkin_lexer_en,如何解决?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29507570/