IronRuby和黄瓜

时间:2009-12-22 14:48:21

标签: cucumber ironruby

使用IronRuby 1.0 RC1运行Cucumber 0.5.1时,出现以下错误:

IronRuby.Libraries.Yaml:0:in `ScanAnchor': while scanning an alias: expected alphabetic or numeric character, but found
something else... (IronRuby::StandardLibrary::Yaml::ScannerException)
        from IronRuby.Libraries.Yaml:0:in `FetchAlias'
        from IronRuby.Libraries.Yaml:0:in `FetchMoreTokens'
        from IronRuby.Libraries.Yaml:0:in `PeekToken'
        from IronRuby.Libraries.Yaml:0:in `Produce'
        from IronRuby.Libraries.Yaml:0:in `ParseStreamNext'
        from IronRuby.Libraries.Yaml:0:in `ComposeNode'
        from IronRuby.Libraries.Yaml:0:in `ComposeNode'
        from IronRuby.Libraries.Yaml:0:in `ComposeNode'
        from IronRuby.Libraries.Yaml:0:in `ComposeDocument'
        from IronRuby.Libraries.Yaml:0:in `GetNode'
        from IronRuby.Libraries.Yaml:0:in `GetData'
        from IronRuby.Libraries.Yaml:0:in `MoveNext'
        from :0:in `load_file'
        from c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber/platform.rb:10
        from C:/Program Files/IronRuby 0.9.3.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber.rb:5
        from :0:in `require'
        from C:/Program Files/IronRuby 0.9.3.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber/cli/main.rb:2
        from C:/Program Files/IronRuby 0.9.3.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from :0:in `require'
        from c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.5.1/bin/cucumber:5
        from c:/ruby/bin/cucumber:19
        from :0:in `require'
        from :0:in `load'

我不知道现在该做什么。 我正在尝试运行示例黄瓜功能。

黄瓜特色(运行正常) icucumber功能(抛出此错误)

1 个答案:

答案 0 :(得分:0)

它与languages.yml文件有关。 该文件正在第10行的platform.rb文件中加载,这是黄瓜宝石的一部分。 我尝试了什么:

  1. 删除文件,但仅限于此 导致找不到文件错误。
  2. 在文件中只保留英文。 那没用。
  3. 清除文件 所有内容。给了一些零 方法错误。