黄瓜在Rails 3上的问题。
这与Ruby on Rails. Bundler. Cucumber. rake aborted! Command failed with status (1)类似,但有些不同。
运行rake cucumber:wip
之后我得到了这个:
bundle exec /home/megas/.rvm/rubies/ruby-1.9.2-p136/bin/ruby -I "/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/cucumber-0.10.0/lib:lib" "/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/cucumber-0.10.0/bin/cucumber" --profile wip
Using the wip profile...
no such file to load -- nokogiri (LoadError)
/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `block in require'
/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:227:in `load_dependency'
/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/cucumber-rails-0.3.2/lib/cucumber/web/tableish.rb:1:in `<top (required)>'
/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `block in require'
/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:227:in `load_dependency'
/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
/home/megas/Work/strawberries/features/support/env.rb:13:in `<top (required)>'
/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/cucumber-0.10.0/lib/cucumber/rb_support/rb_language.rb:143:in `load'
/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/cucumber-0.10.0/lib/cucumber/rb_support/rb_language.rb:143:in `load_code_file'
/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/cucumber-0.10.0/lib/cucumber/runtime/support_code.rb:176:in `load_file'
/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/cucumber-0.10.0/lib/cucumber/runtime/support_code.rb:78:in `block in load_files!'
/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/cucumber-0.10.0/lib/cucumber/runtime/support_code.rb:77:in `each'
/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/cucumber-0.10.0/lib/cucumber/runtime/support_code.rb:77:in `load_files!'
/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/cucumber-0.10.0/lib/cucumber/runtime.rb:137:in `load_step_definitions'
/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/cucumber-0.10.0/lib/cucumber/runtime.rb:39:in `run!'
/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/cucumber-0.10.0/lib/cucumber/cli/main.rb:43:in `execute!'
/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/cucumber-0.10.0/lib/cucumber/cli/main.rb:20:in `execute'
/home/megas/.rvm/gems/ruby-1.9.2-p136/gems/cucumber-0.10.0/bin/cucumber:14:in `<main>'
rake aborted!
Command failed with status (1): [bundle exec /home/megas/.rvm/rubies/ruby-1...]
我的Gemfile
gem 'nifty-generators'
gem 'database_cleaner'
gem 'cucumber-rails'
gem 'cucumber'
gem 'rspec-rails'
gem 'spork'
gem 'launchy'
gem 'machinist', '>= 2.0.0.beta1'
gem 'faker'
区别在于:使用rvm 1.2.0,它根本不起作用,错误信息差异从“没有这样的文件加载 - nokogiri(LoadError)”开始
由于
答案 0 :(得分:1)
尝试在Gemfile中添加nokogiri并运行bundle install
如果这不起作用,请更新您的问题并添加您的env.rb文件和您的Gemfile.lock