gpt4 book ai didi

Ruby Koans 与 Ruby 2.0.0 不兼容?

转载 作者:数据小太阳 更新时间:2023-10-29 06:52:50 31 4
gpt4 key购买 nike

成功升级到 Ruby 2.0.0 的稳定版本后(耶!)我决定继续我的 Koans 启蒙之路。但是,在 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

关于Ruby Koans 与 Ruby 2.0.0 不兼容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15143040/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com