2013-03-07 106 views
0

我試圖使用rspec 2.13.0的factory_girl 4.2.0。首先,我添加 'factory_girl' 我的Gemfile和捆綁更新:未初始化的常量FactoryGirl :: Evaluation :: Observable

Using aasm (3.0.16) 
Using i18n (0.6.4) 
Using multi_json (1.6.1) 
Using activesupport (3.2.12) 
Using builder (3.0.4) 
Using activemodel (3.2.12) 
Using arel (3.0.2) 
Using tzinfo (0.3.36) 
Using activerecord (3.2.12) 
Using active_record_inline_schema (0.6.0) 
Using tins (0.7.1) 
Using amatch (0.2.11) 
Using coderay (1.0.9) 
Using conversions (1.4.6) 
Using fastercsv (1.5.5) 
Using fixed_width-multibyte (0.2.3) 
Using hash_digest (1.0.0) 
Using nokogiri (1.5.6) 
Using rubyzip (0.9.9) 
Using ruby-ole (1.2.11.6) 
Using spreadsheet (0.8.2) 
Using roo (1.10.3) 
Using unix_utils (0.0.15) 
Using remote_table (2.1.0) 
Using to_regexp (0.2.0) 
Using errata (1.1.1) 
Using posix-spawn (0.3.6) 
Using upsert (1.1.7) 
Using data_miner (2.4.1) 
Using diff-lcs (1.2.1) 
Using httpclient (2.3.3) 
Using method_source (0.8.1) 
Using pg (0.14.1) 
Using pg-hstore (1.1.7) 
Using slop (3.4.3) 
Using pry (0.9.12) 
Using rspec-core (2.13.0) 
Using rspec-expectations (2.13.0) 
Using rspec-mocks (2.13.0) 
Using rspec (2.13.0) 
Using umarket1-package (0.2.0) 
Using bundler (1.3.1) 

然後在我的spec_helper.rb我做的:

require 'factory_girl' 

,但我得到這個錯誤:

.rvm/gems/ruby-1.9.3-p327/gems/factory_girl-4.2.0/lib/factory_girl/evaluation.rb:5:in `<class:Evaluation>': uninitialized constant FactoryGirl::Evaluation::Observable (NameError) 

待辦事項我需要在factory_girl之前需要其他東西?

+0

您是否運行軟件包安裝? – megas 2013-03-07 14:08:33

+0

是(編輯問題) – ihough 2013-03-07 15:56:06

+0

你是怎麼調用FactoryGirl的?你能發佈你的代碼嗎? – BlackHatSamurai 2013-03-07 17:14:33

回答

相關問題