1
但是一個基本的RSpec的/黃瓜教程,當我運行命令「腳本/黃瓜功能」,我得到以下錯誤運行環境配置黃瓜/ rspec的面臨的問題並且無法繼續前進。是
Using the default profile...
uninitialized constant Spec::Example (NameError)
/home/badal/NetBeansProjects/blog/vendor/rails/activesupport/lib/active_support/dependencies.rb:442:in `load_missing_constant'
/home/badal/NetBeansProjects/blog/vendor/rails/activesupport/lib/active_support/dependencies.rb:77:in `const_missing'
/usr/lib/ruby/1.8/spec/interop/test/unit/testcase.rb:23
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `polyglot_original_require'
/home/badal/.gem/ruby/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in `require'
/home/badal/NetBeansProjects/blog/vendor/rails/activesupport/lib/active_support/dependencies.rb:155:in `require'
/usr/lib/ruby/1.8/spec/interop/test.rb:4
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `polyglot_original_require'
/home/badal/.gem/ruby/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in `require'
/home/badal/NetBeansProjects/blog/vendor/rails/activesupport/lib/active_support/dependencies.rb:155:in `require'
/var/lib/gems/1.8/gems/rspec-1.3.0/lib/spec/test/unit.rb:1
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `polyglot_original_require'
/home/badal/.gem/ruby/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in `require'
/home/badal/NetBeansProjects/blog/vendor/rails/activesupport/lib/active_support/dependencies.rb:155:in `require'
/var/lib/gems/1.8/gems/rspec-rails-1.3.2/lib/spec/rails.rb:13
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `polyglot_original_require'
/home/badal/.gem/ruby/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in `require'
/home/badal/NetBeansProjects/blog/vendor/rails/activesupport/lib/active_support/dependencies.rb:155:in `require'
/var/lib/gems/1.8/gems/cucumber-rails-0.2.4/lib/cucumber/rails/rspec.rb:3
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `polyglot_original_require'
/home/badal/.gem/ruby/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in `require'
/home/badal/NetBeansProjects/blog/vendor/rails/activesupport/lib/active_support/dependencies.rb:155:in `require'
/home/badal/NetBeansProjects/blog/features/support/env.rb:11
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `polyglot_original_require'
/home/badal/.gem/ruby/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in `require'
/var/lib/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/rb_support/rb_language.rb:124:in `load_code_file'
/var/lib/gems/1.8/gems/cucumber-0.6.2/lib/cucumber/step_mother.rb:84:in `load_code_file'
/var/lib/gems/1.8/gems/cucumber-0.6.2/lib/cucumber/step_mother.rb:76:in `load_code_files'
/var/lib/gems/1.8/gems/cucumber-0.6.2/lib/cucumber/step_mother.rb:75:in `each'
/var/lib/gems/1.8/gems/cucumber-0.6.2/lib/cucumber/step_mother.rb:75:in `load_code_files'
/var/lib/gems/1.8/gems/cucumber-0.6.2/lib/cucumber/cli/main.rb:48:in `execute!'
/var/lib/gems/1.8/gems/cucumber-0.6.2/lib/cucumber/cli/main.rb:20:in `execute'
/var/lib/gems/1.8/gems/cucumber-0.6.2/bin/cucumber:8
script/cucumber:9:in `load'
script/cucumber:9
安裝的寶石如下:
aaronp-frex (1.0.1)
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
brynary-webrat (0.4.0)
builder (2.1.2)
cucumber (0.6.2)
cucumber-rails (0.2.4)
database_cleaner (0.4.3)
diff-lcs (1.1.2)
json_pure (1.2.0)
nokogiri (1.4.1)
polyglot (0.2.9)
rack (1.1.0, 1.0.1)
rack-test (0.5.3)
rails (2.3.5)
rake (0.8.7)
rspec (1.3.0)
rspec-rails (1.3.2)
rubygems-update (1.3.5)
term-ansicolor (1.0.4)
treetop (1.4.3)
webrat (0.7.0)
我使用: 紅寶石1.8.7(2009-06-12 PATCHLEVEL 174)[x86_64的Linux的]
任何線索? TIA。
巴達爾先生,你能把你的堆棧跟蹤格式化爲代碼嗎?單擊編輯,突出顯示堆棧跟蹤,然後單擊101/010,然後保存。謝謝! – 2010-01-26 05:16:47
完成..謝謝指出! – 2010-01-26 06:01:06
嘗試_cucumber_而不是_script/cucumber_。它可能工作。 – Waseem 2010-01-26 08:10:33