1

$ gem install cucumberRuby 2.0.0 (FreeBSD 9.1-i386 GENERIC) を使用して RVM で単純な実行$ cucumberを行いましたが、実行すると次のエラーが発生します。

uninitialized constant Cucumber::RUBY_1_8_7 (NameError)
/home/black/.rvm/gems/ruby-2.0.0-p0@cucumber/gems/cucumber-1.3.2/lib/cucumber/constantize.rb:36:in `constantize_name'
/home/black/.rvm/gems/ruby-2.0.0-p0@cucumber/gems/cucumber-1.3.2/lib/cucumber/constantize.rb:12:in `block in constantize'
/home/black/.rvm/gems/ruby-2.0.0-p0@cucumber/gems/cucumber-1.3.2/lib/cucumber/constantize.rb:11:in `each'
/home/black/.rvm/gems/ruby-2.0.0-p0@cucumber/gems/cucumber-1.3.2/lib/cucumber/constantize.rb:11:in `constantize'
/home/black/.rvm/gems/ruby-2.0.0-p0@cucumber/gems/cucumber-1.3.2/lib/cucumber/runtime/support_code.rb:73:in `load_programming_language'
/home/black/.rvm/gems/ruby-2.0.0-p0@cucumber/gems/cucumber-1.3.2/lib/cucumber/runtime/support_code.rb:194:in `programming_language_for'
/home/black/.rvm/gems/ruby-2.0.0-p0@cucumber/gems/cucumber-1.3.2/lib/cucumber/runtime/support_code.rb:178:in `load_file'
/home/black/.rvm/gems/ruby-2.0.0-p0@cucumber/gems/cucumber-1.3.2/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/home/black/.rvm/gems/ruby-2.0.0-p0@cucumber/gems/cucumber-1.3.2/lib/cucumber/runtime/support_code.rb:82:in `each'
/home/black/.rvm/gems/ruby-2.0.0-p0@cucumber/gems/cucumber-1.3.2/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/home/black/.rvm/gems/ruby-2.0.0-p0@cucumber/gems/cucumber-1.3.2/lib/cucumber/runtime.rb:183:in `load_step_definitions'
/home/black/.rvm/gems/ruby-2.0.0-p0@cucumber/gems/cucumber-1.3.2/lib/cucumber/runtime.rb:42:in `run!'
/home/black/.rvm/gems/ruby-2.0.0-p0@cucumber/gems/cucumber-1.3.2/lib/cucumber/cli/main.rb:47:in `execute!'
/home/black/.rvm/gems/ruby-2.0.0-p0@cucumber/gems/cucumber-1.3.2/bin/cucumber:13:in `<top (required)>'
/home/black/.rvm/gems/ruby-2.0.0-p0@cucumber/bin/cucumber:23:in `load'
/home/black/.rvm/gems/ruby-2.0.0-p0@cucumber/bin/cucumber:23:in `<main>'
/home/black/.rvm/gems/ruby-2.0.0-p0@cucumber/bin/ruby_noexec_wrapper:14:in `eval'
/home/black/.rvm/gems/ruby-2.0.0-p0@cucumber/bin/ruby_noexec_wrapper:14:in `<main>'

同様の問題がありますか?

よろしくお願いいたします。

PS : 私の宝石リストは次のとおりです。

bigdecimal (1.2.0)
builder (3.2.2)
bundler (1.3.5)
cucumber (1.3.2)
diff-lcs (1.2.4)
gherkin (2.12.0)
io-console (0.4.2)
json (1.7.7)
minitest (4.3.2)
multi_json (1.7.7)
psych (2.0.0)
rake (10.0.4, 0.9.6)
rdoc (4.0.0)
rubygems-bundler (1.1.1)
rvm (1.11.3.7)
test-unit (2.0.0.0)
4

2 に答える 2

0

Cucumberバージョンのバグのように見えますが、1.3.2比較的修正する必要があります。

  1. 検索cucumber/constantize:

    gem which cucumber/constantize
    

    あなたの場合、それは次のようになります:

    /home/black/.rvm/gems/ruby-2.0.0-p0@cucumber/gems/cucumber-1.3.2/lib/cucumber/constantize.rb
    
  2. このファイルを編集して、先頭に次のテキストを追加します。

    require 'cucumber/platform'
    
于 2013-06-26T00:54:19.043 に答える