使用 Ironruby 安装 Cucumber
我正在尝试使用ironruby 安装Cucumber。我按照 http://wiki.github.com/aslakhellesoy/cucumber/ 的说明进行操作铁红宝石和网络 。它下载 0.8.3 版本的 cucumber 和 2.0.2 版本的 gherkin。当我运行 Cucumber 时,出现以下错误:
c:/ironruby/lib/ironruby/gems/1.8/gems/gherkin-2.0.2-universal-dotnet/lib/gherki n/native/ikvm.rb:16:in `load_assembly': Assembly 'gherkin' not found\nTry this: SET MONO_PATH=c:/ironruby/lib/ironruby/gems/1.8/gems/gherkin-2.0.2-universal-dot net/lib (or export MONO_PATH=...) (LoadError) from c:/ironruby/lib/ironruby/gems/1.8/gems/gherkin-2.0.2-universal-dotn et/lib/gherkin/native/ikvm.rb:16:in `native_impl' from c:/ironruby/lib/ironruby/gems/1.8/gems/gherkin-2.0.2-universal-dotn et/lib/gherkin/i18n.rb:7 from c:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from c:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from c:/ironruby/lib/ironruby/gems/1.8/gems/gherkin-2.0.2-universal-dotn et/lib/gherkin/i18n_lexer.rb:1 from c:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from c:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from c:/ironruby/lib/ironruby/gems/1.8/gems/gherkin-2.0.2-universal-dotn et/lib/gherkin.rb:1 from c:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from c:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from c:/ironruby/lib/ironruby/gems/1.8/gems/cucumber-0.8.3/bin/../lib/cu cumber/cli/main.rb:5 from c:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from c:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from c:/ironruby/lib/ironruby/gems/1.8/gems/cucumber-0.8.3/bin/cucumber: 5 from C:/ironruby/bin/cucumber:19:in `load' from C:/ironruby/bin/cucumber:19
我尝试设置 MONO_PATH 但这似乎不起作用。有什么想法吗?
I'm trying to install Cucumber with ironruby. I followed instructions from http://wiki.github.com/aslakhellesoy/cucumber/ironruby-and-net . It downloads version 0.8.3 of cucumber and version 2.0.2 of gherkin. When i run cucumber i get the following error:
c:/ironruby/lib/ironruby/gems/1.8/gems/gherkin-2.0.2-universal-dotnet/lib/gherki n/native/ikvm.rb:16:in `load_assembly': Assembly 'gherkin' not found\nTry this: SET MONO_PATH=c:/ironruby/lib/ironruby/gems/1.8/gems/gherkin-2.0.2-universal-dot net/lib (or export MONO_PATH=...) (LoadError) from c:/ironruby/lib/ironruby/gems/1.8/gems/gherkin-2.0.2-universal-dotn et/lib/gherkin/native/ikvm.rb:16:in `native_impl' from c:/ironruby/lib/ironruby/gems/1.8/gems/gherkin-2.0.2-universal-dotn et/lib/gherkin/i18n.rb:7 from c:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from c:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from c:/ironruby/lib/ironruby/gems/1.8/gems/gherkin-2.0.2-universal-dotn et/lib/gherkin/i18n_lexer.rb:1 from c:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from c:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from c:/ironruby/lib/ironruby/gems/1.8/gems/gherkin-2.0.2-universal-dotn et/lib/gherkin.rb:1 from c:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from c:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from c:/ironruby/lib/ironruby/gems/1.8/gems/cucumber-0.8.3/bin/../lib/cu cumber/cli/main.rb:5 from c:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from c:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from c:/ironruby/lib/ironruby/gems/1.8/gems/cucumber-0.8.3/bin/cucumber: 5 from C:/ironruby/bin/cucumber:19:in `load' from C:/ironruby/bin/cucumber:19
I've tried to set the MONO_PATH but that didn't seem to work. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我也遇到了这个问题。解决方案是降低黄瓜和小黄瓜的等级。安装 gherkin 1.0.27 和 cucumber 0.6.4 就可以了。供参考:http://github.com/aslakhellesoy/gherkin/issues/issue/63
I ran into this problem as well. The solution is to downgrade both cucumber and gherkin. Install gherkin 1.0.27 and cucumber 0.6.4 and it works. For reference: http://github.com/aslakhellesoy/gherkin/issues/issue/63
我一直想调查一下。我认为这与新的基于 Ragel 的解析器(Gherkin)有关。它被编译为 Java 类,然后通过 IKVM 编译为 .NET 程序集。我认为在这个过程中,它依赖于 Mono。
I've been meaning to look into that. I think it has something to do with the new Ragel-based parser (Gherkin). It is compiled to a Java class, then compiled to a .NET assembly via IKVM. I think that in the process, it is taking a dependency on Mono.
好吧,您可以使用此要点作为测试运行器来克服该特定错误:
http://gist.github.com /465677
不幸的是,它随后产生了另一个错误。
Well, you can get past that particular bug using this gist as the test runner:
http://gist.github.com/465677
Unfortunately, it then produces another error.