用Ironruby安装黄瓜

时间:2010-06-22 06:39:54

标签: ruby cucumber ironruby

我正在尝试用ironruby安装Cucumber。我按照http://wiki.github.com/aslakhellesoy/cucumber/ironruby-and-net的说明进行操作。它下载黄瓜版本0.8.3和小黄瓜版本2.0.2。当我运行黄瓜时,我得到以下错误:

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,但似乎没有用。有什么想法吗?

3 个答案:

答案 0 :(得分:1)

我也遇到了这个问题。解决方案是降低黄瓜和小黄瓜的评级。安装小黄瓜1.0.27和黄瓜0.6.4,它的工作原理。供参考:http://github.com/aslakhellesoy/gherkin/issues/issue/63

答案 1 :(得分:0)

我一直想调查一下。我认为它与新的基于Ragel的解析器(Gherkin)有关。它被编译为Java类,然后通过IKVM编译为.NET程序集。我认为在这个过程中,它依赖于Mono。

答案 2 :(得分:0)

好吧,你可以使用这个要点作为测试运行者来克服那个特定的错误:

http://gist.github.com/465677

不幸的是,它会产生另一个错误。