获得activesupport 3.2.0的错误 - 无法加载此类文件 - spec_helper

时间:2012-11-30 01:22:49

标签: ruby-on-rails bundler

    /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- spec_helper (LoadError)
        from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `block in require'
        from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:236:in `load_dependency'
        from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require'
        from /Users/jeffreyerickatz/Desktop/sites/demo_app/spec/factories/user.rb:1:in `<top (required)>'
        from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:245:in `load'
        from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:245:in `block in load'
        from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:236:in `load_dependency'
        from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:245:in `load'
        from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/factory_girl-4.1.0/lib/factory_girl/find_definitions.rb:20:in `block (2 levels) in find_definitions'
rom /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/factory_girl-4.1.0/lib/factory_girl/find_definitions.rb:19:in `each'
    from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/factory_girl-4.1.0/lib/factory_girl/find_definitions.rb:19:in `block in find_definitions'
    from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/factory_girl-4.1.0/lib/factory_girl/find_definitions.rb:15:in `each'
    from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/factory_girl-4.1.0/lib/factory_girl/find_definitions.rb:15:in `find_definitions'
    from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/factory_girl_rails-4.1.0/lib/factory_girl_rails/railtie.rb:26:in `block in <class:Railtie>'
    from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/lazy_load_hooks.rb:34:in `call'
    from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
    from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
    from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/lazy_load_hooks.rb:42:in `each'
    from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
    from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/application/finisher.rb:60:in `block in <module:Finisher>'
    from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/initializable.rb:30:in `instance_exec'
    from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/initializable.rb:30:in `run'
    from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/initializable.rb:54:in `each'
    from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/initializable.rb:54:in `run_initializers'
    from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/application.rb:136:in `initialize!'
    from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from /Users/jeffreyerickatz/Desktop/sites/demo_app/config/environment.rb:5:in `<top (required)>'
    from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/application.rb:103:in `require'
    from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/application.rb:103:in `require_environment!'
    from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/commands.rb:40:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

当我尝试运行rails控制台或者真的做任何事情时,我得到了错误(上面)。我假设我的一些宝石彼此不兼容?我正在从rails 3.1更新到rails 3.2。

我最近做了一次捆绑更新。所有内容都更新为:

Jeffreys-MacBook-Pro:demo_app jeffreyerickatz$ bundle update
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://rubygems.org/..
Using rake (10.0.2) 
Using i18n (0.6.1) 
Using multi_json (1.3.7) 
Installing activesupport (3.2.0) 
Using builder (3.0.4) 
Installing activemodel (3.2.0) 
Using erubis (2.7.0) 
Using journey (1.0.4) 
Using rack (1.4.1) 
Using rack-cache (1.2) 
Using rack-test (0.6.2) 
Using hike (1.2.1) 
Using tilt (1.3.3) 
Using sprockets (2.1.3) 
Installing actionpack (3.2.0) 
Using mime-types (1.19) 
Using polyglot (0.3.3) 
Using treetop (1.4.12) 
Using mail (2.4.4) 
Installing actionmailer (3.2.0) 
Using arel (3.0.2) 
Using tzinfo (0.3.35) 
Installing activerecord (3.2.0) 
Installing activeresource (3.2.0) 
Using annotate (2.5.0) 
Using ansi (1.4.3) 
Using xml-simple (1.1.2) 
Using aws-s3 (0.6.3) 
Using multi_xml (0.5.1) 
Using httparty (0.9.0) 
Using json (1.7.5) 
Using nokogiri (1.5.5) 
Using uuidtools (2.1.3) 
Using aws-sdk (1.3.9) 
Using bootstrap-sass (2.0.0) 
Using will_paginate (3.0.3) 
Using bootstrap-will_paginate (0.0.5) 
Using bundler (1.1.5) 
Using hsume2-state_machine (1.0.5) 
Using call_center (0.1.7) 
Using carmen (0.2.13) 
Using clockwork (0.4.1) 
Using cocaine (0.4.2) 
Using coderay (1.0.8) 
Using coffee-script-source (1.4.0) 
Using execjs (1.4.0) 
Using coffee-script (2.2.0) 
Using rack-ssl (1.3.2) 
Using rdoc (3.12) 
Using thor (0.14.6) 
Installing railties (3.2.0) 
Using coffee-rails (3.2.2) 
Using diff-lcs (1.1.3) 
Using factory_girl (4.1.0) 
Using factory_girl_rails (4.1.0) 
Using faker (1.1.2) 
Using fakeweb (1.3.0) 
Using foreman (0.60.2) 
Using googlecharts (1.6.8) 
Using listen (0.6.0) 
Using lumberjack (1.0.2) 
Using method_source (0.8.1) 
Using slop (3.3.3) 
Using pry (0.9.10) 
Using guard (1.5.4) 
Using guard-rspec (1.2.1) 
Installing jquery-rails (2.1.4) 
Using jwt (0.1.5) 
Installing nested_form (0.3.1) 
Using paperclip (3.3.1) 
Using pg (0.14.1) 
Using pry-nav (0.2.2) 
Using pry-rails (0.2.2) 
Installing rails (3.2.0) 
Using rest-client (1.6.7) 
Using rspec-core (2.7.1) 
Using rspec-expectations (2.7.0) 
Using rspec-mocks (2.7.0) 
Using rspec (2.7.0) 
Using rspec-rails (2.7.0) 
Using ruby-graphviz (1.0.8) 
Installing sass (3.2.3) 
Using sass-rails (3.2.5) 
Using simple_form (2.0.4) 
Using spork (0.9.2) 
Using sqlite3 (1.3.6) 
Installing timecop (0.5.4) 
Using turn (0.9.6) 
Using twilio-ruby (3.9.0) 
Using uglifier (1.3.0) 

1 个答案:

答案 0 :(得分:2)

通过回溯,看起来/Users/jeffreyerickatz/Desktop/sites/demo_app/spec/factories/user.rb的第1行正在尝试加载spec_helper.rb - 您可以安全地删除此行,只有规格应该要求spec_helper。