ruby - 无法加载此类文件 -- 2.2/gherkin_lexer_en,如何解决?

标签 ruby cucumber calabash calabash-android

我需要一点帮助。我该如何解决这个问题?

当我调用 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/

相关文章:

ruby - 解析 RDFa、微数据等的最佳方式是什么,使用统一的模式/词汇(例如 schema.org)存储和显示信息

java - cucumber 抛出 java.lang.NoClassDefFoundError : io/cucumber/core/gherkin/FeatureParser

ios - 无法更新葫芦服务器版本

android - 葫芦安卓 : Check if a button is present and enabled

ruby - 安装可移植 ruby​​ 和可移植 xampp 以便在我的 Windows 机器 : Is that possible? 中使用 compass 和 sass

ruby-on-rails - 如何在工厂女孩中分配哈希值?

cucumber - SpecFlow-在不同类中具有相同正则表达式的步骤(给出)不独立执行

android - 没有找到此应用程序和葫芦版本组合的测试服务器。重新创建测试服务器

ruby - 当没有对对象的引用时,对象会发生什么特别的事情吗?

ruby-on-rails - 如何在 Capybara 中获取父节点?