Ruby Koans与Ruby 2.0.0不兼容?

前端之家收集整理的这篇文章主要介绍了Ruby Koans与Ruby 2.0.0不兼容?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
在成功升级Ruby 2.0.0的稳定版本之后(耶!)我决定继续我的Koans Path to Enlightenment.但是,当我像往常一样在koans文件夹中运行rake命令时,我收到此错误
rake
cd koans
/Users/jordanthornquest/.rvm/rubies/ruby-2.0.0-p0/bin/ruby path_to_enlightenment.rb
/Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:399:in `rescue in meditate': uninitialized constant EdgeCase::Sensei::AssertionError (NameError)
    from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:407:in `meditate'
    from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:470:in `block in walk'
    from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:481:in `block (3 levels) in each_step'
    from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:479:in `each'
    from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:479:in `block (2 levels) in each_step'
    from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:478:in `each'
    from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:478:in `each_with_index'
    from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:478:in `block in each_step'
    from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:476:in `catch'
    from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:476:in `each_step'
    from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:469:in `walk'
    from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:491:in `block in <top (required)>'
rake aborted!
Command Failed with status (1): [/Users/jordanthornquest/.rvm/rubies/ruby-2...]
/Users/jordanthornquest/programming/ruby-koans/Rakefile:90:in `block in <top (required)>'
/Users/jordanthornquest/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `eval'
/Users/jordanthornquest/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => default => walk_the_path

我今天也从GitHub安装了一个新的Koans批次,以确保这不是我的问题.对我来说都没有用! 1.9.3仍然很好.值得注意的是,我还通过RVM安装了Ruby 2.0.我确保在这之前更新到最新的RVM.

什么似乎是问题?

解决方法

有一个拉动请求来解决这个问题,但还没有被接受: https://github.com/neo/ruby_koans/pull/84

现在,您可以将src / edgecase.rb的第149行编辑为:

in_ruby_version("1.9","2.0") do
原文链接:https://www.f2er.com/ruby/270520.html

猜你在找的Ruby相关文章