2010-03-27 87 views
1

我試圖在新鮮的Rails 3應用程序與工廠女孩工廠運行黃瓜特徵。無法使用工廠女孩與黃瓜和鐵軌3(捆綁器問題)

這裏是我的Gemfile:

source "http://gemcutter.org" 
gem "rails", "3.0.0.beta" 
gem "pg" 
gem "factory_girl", :git => "git://github.com/thoughtbot/factory_girl.git", :branch => "rails3" 
gem "rspec-rails", ">= 2.0.0.beta.4" 
gem "capybara" 
gem "database_cleaner" 
gem "cucumber-rails", :require => false 

然後捆綁安裝COMMANDE只是運行平穩:

$ bundle install 
/usr/lib/ruby/gems/1.8/gems/bundler-0.9.3/lib/bundler/installer.rb:81:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement 
Updating git://github.com/thoughtbot/factory_girl.git 
Fetching source index from http://gemcutter.org 
Resolving dependencies 
Installing abstract (1.0.0) from system gems 
Installing actionmailer (3.0.0.beta) from system gems 
Installing actionpack (3.0.0.beta) from system gems 
Installing activemodel (3.0.0.beta) from system gems 
Installing activerecord (3.0.0.beta) from system gems 
Installing activeresource (3.0.0.beta) from system gems 
Installing activesupport (3.0.0.beta) from system gems 
Installing arel (0.2.1) from system gems 
Installing builder (2.1.2) from system gems 
Installing bundler (0.9.13) from system gems 
Installing capybara (0.3.6) from system gems 
Installing cucumber (0.6.3) from system gems 
Installing cucumber-rails (0.3.0) from system gems 
Installing culerity (0.2.9) from system gems 
Installing database_cleaner (0.5.0) from system gems 
Installing diff-lcs (1.1.2) from system gems 
Installing erubis (2.6.5) from system gems 
Installing factory_girl (1.2.3) from git://github.com/thoughtbot/factory_girl.git (at rails3) 
Installing ffi (0.6.3) from system gems 
Installing i18n (0.3.6) from system gems 
Installing json_pure (1.2.3) from system gems 
Installing mail (2.1.3) from system gems 
Installing memcache-client (1.7.8) from system gems 
Installing mime-types (1.16) from system gems 
Installing nokogiri (1.4.1) from system gems 
Installing pg (0.9.0) from system gems 
Installing polyglot (0.3.0) from system gems 
Installing rack (1.1.0) from system gems 
Installing rack-mount (0.4.7) from system gems 
Installing rack-test (0.5.3) from system gems 
Installing rails (3.0.0.beta) from system gems 
Installing railties (3.0.0.beta) from system gems 
Installing rake (0.8.7) from system gems 
Installing rspec (2.0.0.beta.4) from system gems 
Installing rspec-core (2.0.0.beta.4) from system gems 
Installing rspec-expectations (2.0.0.beta.4) from system gems 
Installing rspec-mocks (2.0.0.beta.4) from system gems 
Installing rspec-rails (2.0.0.beta.4) from system gems 
Installing selenium-webdriver (0.0.17) from system gems 
Installing term-ansicolor (1.0.5) from system gems 
Installing text-format (1.0.0) from system gems 
Installing text-hyphen (1.0.0) from system gems 
Installing thor (0.13.4) from system gems 
Installing treetop (1.4.4) from system gems 
Installing tzinfo (0.3.17) from system gems 
Installing webrat (0.7.0) from system gems 
Your bundle is complete! 

當我運行黃瓜,這裏是錯誤,我得到:

$ rake cucumber 
(in /home/jbpros/projects/deorbitburn) 
/usr/lib/ruby/gems/1.8/gems/bundler-0.9.3/lib/bundler/resolver.rb:97:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement 
NOTICE: CREATE TABLE will create implicit sequence "posts_id_seq" for serial column "posts.id" 
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index "posts_pkey" for table "posts" 
/usr/bin/ruby1.8 -I "/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.3/lib:lib" "/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.3/bin/cucumber" --profile default 
Using the default profile... 
git://github.com/thoughtbot/factory_girl.git (at rails3) is not checked out. Please run `bundle install` (Bundler::PathError) 
/home/jbpros/.bundle/gems/bundler-0.9.13/lib/bundler/source.rb:282:in `load_spec_files' 
/home/jbpros/.bundle/gems/bundler-0.9.13/lib/bundler/source.rb:190:in `local_specs' 
/home/jbpros/.bundle/gems/bundler-0.9.13/lib/bundler/environment.rb:36:in `runtime_gems' 
/home/jbpros/.bundle/gems/bundler-0.9.13/lib/bundler/environment.rb:35:in `each' 
/home/jbpros/.bundle/gems/bundler-0.9.13/lib/bundler/environment.rb:35:in `runtime_gems' 
/home/jbpros/.bundle/gems/bundler-0.9.13/lib/bundler/index.rb:5:in `build' 
/home/jbpros/.bundle/gems/bundler-0.9.13/lib/bundler/environment.rb:34:in `runtime_gems' 
/home/jbpros/.bundle/gems/bundler-0.9.13/lib/bundler/environment.rb:14:in `index' 
/home/jbpros/.bundle/gems/bundler-0.9.13/lib/bundler/index.rb:5:in `build' 
/home/jbpros/.bundle/gems/bundler-0.9.13/lib/bundler/environment.rb:13:in `index' 
/home/jbpros/.bundle/gems/bundler-0.9.13/lib/bundler/environment.rb:55:in `resolve_locally' 
/home/jbpros/.bundle/gems/bundler-0.9.13/lib/bundler/environment.rb:28:in `specs' 
/home/jbpros/.bundle/gems/bundler-0.9.13/lib/bundler/environment.rb:65:in `specs_for' 
/home/jbpros/.bundle/gems/bundler-0.9.13/lib/bundler/environment.rb:23:in `requested_specs' 
/home/jbpros/.bundle/gems/bundler-0.9.13/lib/bundler/runtime.rb:18:in `setup' 
/home/jbpros/.bundle/gems/bundler-0.9.13/lib/bundler.rb:68:in `setup' 
/home/jbpros/projects/deorbitburn/config/boot.rb:7 
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `polyglot_original_require' 
/usr/lib/ruby/gems/1.8/gems/polyglot-0.3.0/lib/polyglot.rb:65:in `require' 
/home/jbpros/projects/deorbitburn/config/application.rb:1 
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `polyglot_original_require' 
/usr/lib/ruby/gems/1.8/gems/polyglot-0.3.0/lib/polyglot.rb:65:in `require' 
/home/jbpros/projects/deorbitburn/config/environment.rb:2 
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `polyglot_original_require' 
/usr/lib/ruby/gems/1.8/gems/polyglot-0.3.0/lib/polyglot.rb:65:in `require' 
/home/jbpros/projects/deorbitburn/features/support/env.rb:8 
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `polyglot_original_require' 
/usr/lib/ruby/gems/1.8/gems/polyglot-0.3.0/lib/polyglot.rb:65:in `require' 
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.3/bin/../lib/cucumber/rb_support/rb_language.rb:124:in `load_code_file' 
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.3/bin/../lib/cucumber/step_mother.rb:85:in `load_code_file' 
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.3/bin/../lib/cucumber/step_mother.rb:77:in `load_code_files' 
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.3/bin/../lib/cucumber/step_mother.rb:76:in `each' 
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.3/bin/../lib/cucumber/step_mother.rb:76:in `load_code_files' 
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.3/bin/../lib/cucumber/cli/main.rb:48:in `execute!' 
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.3/bin/../lib/cucumber/cli/main.rb:20:in `execute' 
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.3/bin/cucumber:8 
rake aborted! 
Command failed with status (1): [/usr/bin/ruby1.8 -I "/usr/lib/ruby/gems/1....] 

(See full trace by running task with --trace) 

我是否必須爲捆綁器做一些特殊的事情才能在github上查看factory girl的倉庫?

回答

0

好吧,我發現這個問題。我正在運行bundler 0.9.3。升級到0.9.13並運行「軟件包安裝」修復了一切。

上側
1

您是否嘗試過運行bundle pack

+0

我做了,它也不工作。有什麼奇怪的是,捆綁包似乎並沒有將工廠女孩複製到供應商/:http://pastie.org/889955 – jbpros 2010-03-27 19:04:45

+0

運行此命令解決了我的困境。 – 2010-11-15 14:54:13

3

注意,您可能希望包括在您的Gemfile

,因爲這不是factory_girl「factory_girl_rails」是軌道3 我們發現,雖然我們的工廠用黃瓜工作他們沒有與測試工作的修復:單位,直到我們有這個寶石

+0

謝謝你的提示。我會嘗試的。 – jbpros 2010-07-17 11:39:04