无法让黄瓜6.3在轨道上运行2.3.4

时间:2010-03-16 23:28:01

标签: ruby-on-rails ruby cucumber

我正试图让黄瓜在没有运气的情况下运行。这是我看到的错误:

cucumber features Using the default profile... no such file to
     

load - test /(MissingSourceFile)   /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in   gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in polyglot_original_require”   /Library/Ruby/Gems/1.8/gems/polyglot-0.3.0/lib/polyglot.rb:65:in   require' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in 需要”   /Users/yakovrabinovich/Starstreet/starstreet/vendor/gems/cucumber-0.6.3/bin/../lib/cucumber/rails/world.rb:11   /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in   gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in polyglot_original_require”   /Library/Ruby/Gems/1.8/gems/polyglot-0.3.0/lib/polyglot.rb:65:in   require' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in 需要”   /Library/Ruby/Gems/1.8/gems/cucumber-rails-0.3.0/lib/cucumber/rails/rspec.rb:1   /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in   gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in polyglot_original_require”   /Library/Ruby/Gems/1.8/gems/polyglot-0.3.0/lib/polyglot.rb:65:in   require' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in 需要”   /Users/yakovrabinovich/Starstreet/starstreet/features/support/env.rb:11   /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in   gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in polyglot_original_require”   /Library/Ruby/Gems/1.8/gems/polyglot-0.3.0/lib/polyglot.rb:65:in   require' /Library/Ruby/Gems/1.8/gems/cucumber-0.6.3/bin/../lib/cucumber/rb_support/rb_language.rb:124:in load_code_file”   /Library/Ruby/Gems/1.8/gems/cucumber-0.6.3/bin/../lib/cucumber/step_mother.rb:85:in   load_code_file' /Library/Ruby/Gems/1.8/gems/cucumber-0.6.3/bin/../lib/cucumber/step_mother.rb:77:in load_code_files'   /Library/Ruby/Gems/1.8/gems/cucumber-0.6.3/bin/../lib/cucumber/step_mother.rb:76:in   each' /Library/Ruby/Gems/1.8/gems/cucumber-0.6.3/bin/../lib/cucumber/step_mother.rb:76:in load_code_files'   /Library/Ruby/Gems/1.8/gems/cucumber-0.6.3/bin/../lib/cucumber/cli/main.rb:48:in   execute!' /Library/Ruby/Gems/1.8/gems/cucumber-0.6.3/bin/../lib/cucumber/cli/main.rb:20:in 执行”   /Library/Ruby/Gems/1.8/gems/cucumber-0.6.3/bin/cucumber:8 / usr / bin / cucumber:19:在'load'中   的/ usr /斌/黄瓜:19

这是我的宝石:

Yakov-Rabinovichs-MacBook:1.8 yakovrabinovich $ gem list

*本地宝石*

aasm (2.1.3)
acl9 (0.11.0)
actionmailer (2.3.4, 2.2.2, 1.3.6)
actionpack (2.3.4, 2.2.2, 1.13.6)
actionwebservice (1.2.6)
activerecord (2.3.4, 2.2.2, 1.15.6)
activeresource (2.3.4, 2.2.2)
activesupport (2.3.4, 2.2.2, 1.4.4)
acts_as_ferret (0.4.3)
authlogic (2.1.3)
bgetting-hominid (1.2.0)
builder (2.1.2)
capistrano (2.5.2)
capistrano-ext (1.2.1)
cgi_multipart_eof_fix (2.5.0)
chronic (0.2.3)
columnize (0.3.1)
configatron (2.5.1)
cucumber (0.6.3)
cucumber-rails (0.3.0)
daemons (1.0.10)
database_cleaner (0.5.0)
diff-lcs (1.1.2)
dnssd (0.6.0)
factory_girl (1.2.3)
fastthread (1.0.1)
fcgi (0.8.7)
ferret (0.11.6)
gem_plugin (0.2.3)
gemcutter (0.4.1)
highline (1.5.0)
hoe (2.5.0)
hominid (2.1.0)
hpricot (0.6.164)
json (1.2.0)
json_pure (1.2.0)
libxml-ruby (1.1.2)
linecache (0.43)
mocha (0.9.8)
mongrel (1.1.5)
needle (1.3.0)
net-scp (1.0.1)
net-sftp (2.0.1, 1.1.1)
net-ssh (2.0.16, 2.0.4, 1.1.4)
net-ssh-gateway (1.0.0)
nokogiri (1.4.1)
oauth (0.3.6)
pg (0.8.0)
polyglot (0.3.0)
rack (1.0.1)
rack-test (0.5.3)
rails (2.3.4, 2.2.2, 1.2.6)
rake (0.8.7, 0.8.3)
RedCloth (4.1.1)
rspec (1.3.0)
rspec-rails (1.3.2)
ruby-debug (0.10.3)
ruby-debug-base (0.10.3)
ruby-hmac (0.4.0)
ruby-openid (2.1.2)
ruby-yadis (0.3.4)
rubyforge (2.0.3)
rubygems-update (1.3.5)
rubynode (0.1.5)
sqlite3-ruby (1.2.4)
term-ansicolor (1.0.4)
termios (0.9.4)
test-unit (1.2.3)
thoughtbot-factory_girl (1.2.2)
thoughtbot-shoulda (2.10.2)
treetop (1.4.4)
whenever (0.4.1)
will_paginate (2.3.11)
xmpp4r (0.4)
yamler (0.1.0)

非常感谢任何帮助!

2 个答案:

答案 0 :(得分:0)

安装黄瓜宝石后,您是否运行过Cucumber生成器?这一切都记录在这里。 http://wiki.github.com/aslakhellesoy/cucumber/ruby-on-rails

当我忘记在自己的安装上运行生成器时,我似乎记得得到了这个错误。错误提及的“默认配置文件”在运行生成器时创建的cucumber.yml文件中引用。

ruby​​脚本/生成黄瓜

答案 1 :(得分:0)

尝试设置环境变量RSPEC,看起来它正在查看您的测试/单元目录(​​假设您当然正在使用rspec!)

export RSPEC=true

它也可能是config / cucumber中的默认设置.yaml正在查找不存在的文件。暂时重命名此文件,看它是否开始工作。我不得不从我手中删除很多东西。作为参考,它看起来像这样:

<%
# rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
# rerun_opts = rerun.to_s.strip.empty? ? "--format progress features" : "--format           #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
# std_opts = "#{rerun_opts} --format rerun --out rerun.txt --strict --tags ~@wip"
std_opts = "--format progress features"
%>
default: <%= std_opts %>
wip: --tags @wip:3 --wip features

正如你所看到的,我评论了很多。