Rake db:migrate 具有冲突的测试单元 gem 依赖项(需要 1.2.3,已安装 2.3.0)

发布于 2024-11-08 15:14:46 字数 10308 浏览 3 评论 0原文

我正在尝试运行

rake db:migrate

但是每次我都会收到以下错误:

rake aborted!
can't activate test-unit (= 1.2.3), already activated test-unit-2.3.0. Make sure all dependencies are added to Gemfile.
/Users/petenixey/project/Rakefile:12:in `<top (required)>'
(See full trace by running task with --trace)
Peters-MacBook-Air:pingpanel petenixey$ 

我有其他依赖于 test-unti 2.3.0 的 gem,并且我似乎找不到其他有相同问题的人。

我最近在宝石问题上遇到了一些麻烦,非常感谢人们提供的任何建议。谢谢

编辑 我注意到的另一件事是,如果我使用下面的 gemfiles 和 gemset 创建一个全新的 Rails 项目, rake db:migrate 确实可以工作。这向我表明环境设置或类似情况出现了问题,但我不知道是什么。

---------------- 使用 --trace 运行时出现的完整错误

rake aborted!
can't activate test-unit (= 1.2.3), already activated test-unit-2.3.0. Make sure all dependencies are added to Gemfile.
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@global/gems/bundler-1.0.13/lib/bundler/rubygems_integration.rb:150:in `block in replace_gem'
/Users/petenixey/project/tasks/rspec.rake:1:in `<top (required)>'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:235:in `load'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:235:in `block in load'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:596:in `new_constants_in'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `load_dependency'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:235:in `load'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/railties-3.0.7/lib/rails/engine.rb:131:in `block in load_tasks'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/railties-3.0.7/lib/rails/engine.rb:131:in `each'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/railties-3.0.7/lib/rails/engine.rb:131:in `load_tasks'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/railties-3.0.7/lib/rails/application.rb:141:in `load_tasks'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/railties-3.0.7/lib/rails/application.rb:77:in `method_missing'
/Users/petenixey/Dropbox/rails/pingpanel/Rakefile:12:in `<top (required)>'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/rake-0.8.7/lib/rake.rb:2017:in `block in load_rakefile'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/rake-0.8.7/lib/rake.rb:2000:in `block in run'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/rake-0.8.7/bin/rake:31:in `<top (required)>'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/bin/rake:19:in `load'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/bin/rake:19:in `<main>'

-------------- Gemfile

source :rubygems

gem "authlogic"
gem "sqlite3-ruby", :require => "sqlite3"
gem 'jquery-rails', '>= 0.2.6'
gem "hoptoad_notifier"
gem "rake"
gem "rails", ">=3.0.7"
gem "heroku"

group :development, :test do
  # up to date
  gem "faker"
  gem "factory_girl_rails"
  gem "ruby-debug19"
  gem "capybara", ">= 0.4.1.2"
  gem 'cucumber-rails'
  gem 'database_cleaner'
  gem "rspec-rails" 
  gem 'test-unit'
end

gem "launchy"
gem "autotest"
gem "autotest-growl"
gem "autotest-rails-pure"
gem "autotest-fsevent"
gem 'metric_fu'

-------------- ------ Gemfile锁

GEM
  remote: http://rubygems.org/
  specs:
    Saikuro (1.1.0)
    ZenTest (4.5.0)
    abstract (1.0.0)
    actionmailer (3.0.7)
      actionpack (= 3.0.7)
      mail (~> 2.2.15)
    actionpack (3.0.7)
      activemodel (= 3.0.7)
      activesupport (= 3.0.7)
      builder (~> 2.1.2)
      erubis (~> 2.6.6)
      i18n (~> 0.5.0)
      rack (~> 1.2.1)
      rack-mount (~> 0.6.14)
      rack-test (~> 0.5.7)
      tzinfo (~> 0.3.23)
    activemodel (3.0.7)
      activesupport (= 3.0.7)
      builder (~> 2.1.2)
      i18n (~> 0.5.0)
    activerecord (3.0.7)
      activemodel (= 3.0.7)
      activesupport (= 3.0.7)
      arel (~> 2.0.2)
      tzinfo (~> 0.3.23)
    activeresource (3.0.7)
      activemodel (= 3.0.7)
      activesupport (= 3.0.7)
    activesupport (3.0.7)
    archive-tar-minitar (0.5.2)
    arel (2.0.10)
    arrayfields (4.7.4)
    authlogic (3.0.3)
      activerecord (>= 3.0.7)
      activerecord (>= 3.0.7)
    autotest (4.4.6)
      ZenTest (>= 4.4.1)
    autotest-fsevent (0.2.5)
      sys-uname
    autotest-growl (0.2.9)
    autotest-rails-pure (4.1.2)
    builder (2.1.2)
    capybara (0.4.1.2)
      celerity (>= 0.7.9)
      culerity (>= 0.2.4)
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      selenium-webdriver (>= 0.0.27)
      xpath (~> 0.1.3)
    celerity (0.8.9)
    childprocess (0.1.9)
      ffi (~> 1.0.6)
    chronic (0.3.0)
    churn (0.0.13)
      chronic (>= 0.2.3)
      hirb
      json_pure
      main
      ruby_parser (~> 2.0.4)
      sexp_processor (~> 3.0.3)
    colored (1.2)
    columnize (0.3.2)
    configuration (1.2.0)
    cucumber (0.10.2)
      builder (>= 2.1.2)
      diff-lcs (>= 1.1.2)
      gherkin (>= 2.3.5)
      json (>= 1.4.6)
      term-ansicolor (>= 1.0.5)
    cucumber-rails (0.4.1)
      cucumber (>= 0.10.1)
      nokogiri (>= 1.4.4)
      rack-test (>= 0.5.7)
    culerity (0.2.15)
    database_cleaner (0.6.7)
    diff-lcs (1.1.2)
    erubis (2.6.6)
      abstract (>= 1.0.0)
    factory_girl (1.3.3)
    factory_girl_rails (1.0.1)
      factory_girl (~> 1.3)
      railties (>= 3.0.0)
    faker (0.9.5)
      i18n (~> 0.4)
    fattr (2.2.0)
    ffi (1.0.8)
    flay (1.4.2)
      ruby_parser (~> 2.0)
      sexp_processor (~> 3.0)
    flog (2.5.1)
      ruby_parser (~> 2.0)
      sexp_processor (~> 3.0)
    gherkin (2.3.8)
      json (>= 1.4.6)
    haml (3.1.1)
    heroku (2.1.4)
      launchy (>= 0.3.2)
      rest-client (~> 1.6.1)
      term-ansicolor (~> 1.0.5)
    hirb (0.4.5)
    hoptoad_notifier (2.4.9)
      activesupport
      builder
    i18n (0.5.0)
    jquery-rails (1.0.5)
      railties (~> 3.0)
      thor (~> 0.14)
    json (1.5.1)
    json_pure (1.5.1)
    launchy (0.4.0)
      configuration (>= 0.0.5)
      rake (>= 0.8.1)
    linecache19 (0.5.12)
      ruby_core_source (>= 0.1.4)
    mail (2.2.19)
      activesupport (>= 2.3.6)
      i18n (>= 0.4.0)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    main (4.4.0)
      arrayfields (>= 4.7.4)
      fattr (>= 2.1.0)
    metric_fu (2.1.1)
      Saikuro (>= 1.1.0)
      activesupport (>= 2.0.0)
      chronic (~> 0.3.0)
      churn (>= 0.0.7)
      flay (>= 1.2.1)
      flog (>= 2.3.0)
      rails_best_practices (>= 0.6.4)
      rcov (>= 0.8.3.3)
      reek (>= 1.2.6)
      roodi (>= 2.1.0)
      syntax
    mime-types (1.16)
    nokogiri (1.4.4)
    polyglot (0.3.1)
    rack (1.2.2)
    rack-mount (0.6.14)
      rack (>= 1.0.0)
    rack-test (0.5.7)
      rack (>= 1.0)
    rails (3.0.7)
      actionmailer (= 3.0.7)
      actionpack (= 3.0.7)
      activerecord (= 3.0.7)
      activeresource (= 3.0.7)
      activesupport (= 3.0.7)
      bundler (~> 1.0)
      railties (= 3.0.7)
    rails_best_practices (0.9.0)
      activesupport
      colored
      erubis
      haml
      i18n
      ruby-progressbar
      ruby_parser
    railties (3.0.7)
      actionpack (= 3.0.7)
      activesupport (= 3.0.7)
      rake (>= 0.8.7)
      thor (~> 0.14.4)
    rake (0.8.7)
    rcov (0.9.9)
    reek (1.2.8)
      ruby2ruby (~> 1.2)
      ruby_parser (~> 2.0)
      sexp_processor (~> 3.0)
    rest-client (1.6.1)
      mime-types (>= 1.16)
    roodi (2.1.0)
      ruby_parser
    rspec (2.6.0)
      rspec-core (~> 2.6.0)
      rspec-expectations (~> 2.6.0)
      rspec-mocks (~> 2.6.0)
    rspec-core (2.6.1)
    rspec-expectations (2.6.0)
      diff-lcs (~> 1.1.2)
    rspec-mocks (2.6.0)
    rspec-rails (2.6.0)
      actionpack (~> 3.0)
      activesupport (~> 3.0)
      railties (~> 3.0)
      rspec (~> 2.6.0)
    ruby-debug-base19 (0.11.25)
      columnize (>= 0.3.1)
      linecache19 (>= 0.5.11)
      ruby_core_source (>= 0.1.4)
    ruby-debug19 (0.11.6)
      columnize (>= 0.3.1)
      linecache19 (>= 0.5.11)
      ruby-debug-base19 (>= 0.11.19)
    ruby-progressbar (0.0.10)
    ruby2ruby (1.2.5)
      ruby_parser (~> 2.0)
      sexp_processor (~> 3.0)
    ruby_core_source (0.1.5)
      archive-tar-minitar (>= 0.5.2)
    ruby_parser (2.0.6)
      sexp_processor (~> 3.0)
    rubyzip (0.9.4)
    selenium-webdriver (0.2.0)
      childprocess (>= 0.1.7)
      ffi (>= 1.0.7)
      json_pure
      rubyzip
    sexp_processor (3.0.5)
    sqlite3 (1.3.3)
    sqlite3-ruby (1.3.3)
      sqlite3 (>= 1.3.3)
    syntax (1.0.0)
    sys-uname (0.8.5)
    term-ansicolor (1.0.5)
    test-unit (2.3.0)
    thor (0.14.6)
    treetop (1.4.9)
      polyglot (>= 0.3.1)
    tzinfo (0.3.27)
    xpath (0.1.4)
      nokogiri (~> 1.3)

PLATFORMS
  ruby

DEPENDENCIES
  authlogic
  autotest
  autotest-fsevent
  autotest-growl
  autotest-rails-pure
  capybara (>= 0.4.1.2)
  cucumber-rails
  database_cleaner
  factory_girl_rails
  faker
  heroku
  hoptoad_notifier
  jquery-rails (>= 0.2.6)
  launchy
  metric_fu
  rails (>= 3.0.7)
  rspec-rails
  ruby-debug19
  sqlite3-ruby
  test-unit

I'm trying to run

rake db:migrate

However each time I do I get the following errors:

rake aborted!
can't activate test-unit (= 1.2.3), already activated test-unit-2.3.0. Make sure all dependencies are added to Gemfile.
/Users/petenixey/project/Rakefile:12:in `<top (required)>'
(See full trace by running task with --trace)
Peters-MacBook-Air:pingpanel petenixey$ 

I have other gems that have dependencies on test-unti 2.3.0 and I can't seem to find anyone else with the same issue.

I've been having a bit of a rubbish time with gem issues recently, would be very grateful for any advice people have. Thank you

Edit
The other thing I've noticed is that if I create a completely fresh Rails project using the gemfiles and gemsets below, rake db:migrate does work. This would suggest to me that something is wrong in an environment setting or similar but I can't figure out what.

---------------- full errors from running with --trace

rake aborted!
can't activate test-unit (= 1.2.3), already activated test-unit-2.3.0. Make sure all dependencies are added to Gemfile.
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@global/gems/bundler-1.0.13/lib/bundler/rubygems_integration.rb:150:in `block in replace_gem'
/Users/petenixey/project/tasks/rspec.rake:1:in `<top (required)>'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:235:in `load'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:235:in `block in load'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:596:in `new_constants_in'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `load_dependency'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:235:in `load'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/railties-3.0.7/lib/rails/engine.rb:131:in `block in load_tasks'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/railties-3.0.7/lib/rails/engine.rb:131:in `each'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/railties-3.0.7/lib/rails/engine.rb:131:in `load_tasks'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/railties-3.0.7/lib/rails/application.rb:141:in `load_tasks'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/railties-3.0.7/lib/rails/application.rb:77:in `method_missing'
/Users/petenixey/Dropbox/rails/pingpanel/Rakefile:12:in `<top (required)>'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/rake-0.8.7/lib/rake.rb:2017:in `block in load_rakefile'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/rake-0.8.7/lib/rake.rb:2000:in `block in run'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/gems/rake-0.8.7/bin/rake:31:in `<top (required)>'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/bin/rake:19:in `load'
/Users/petenixey/.rvm/gems/ruby-1.9.2-p180@test/bin/rake:19:in `<main>'

-------------- Gemfile

source :rubygems

gem "authlogic"
gem "sqlite3-ruby", :require => "sqlite3"
gem 'jquery-rails', '>= 0.2.6'
gem "hoptoad_notifier"
gem "rake"
gem "rails", ">=3.0.7"
gem "heroku"

group :development, :test do
  # up to date
  gem "faker"
  gem "factory_girl_rails"
  gem "ruby-debug19"
  gem "capybara", ">= 0.4.1.2"
  gem 'cucumber-rails'
  gem 'database_cleaner'
  gem "rspec-rails" 
  gem 'test-unit'
end

gem "launchy"
gem "autotest"
gem "autotest-growl"
gem "autotest-rails-pure"
gem "autotest-fsevent"
gem 'metric_fu'

----------------- Gemfile lock

GEM
  remote: http://rubygems.org/
  specs:
    Saikuro (1.1.0)
    ZenTest (4.5.0)
    abstract (1.0.0)
    actionmailer (3.0.7)
      actionpack (= 3.0.7)
      mail (~> 2.2.15)
    actionpack (3.0.7)
      activemodel (= 3.0.7)
      activesupport (= 3.0.7)
      builder (~> 2.1.2)
      erubis (~> 2.6.6)
      i18n (~> 0.5.0)
      rack (~> 1.2.1)
      rack-mount (~> 0.6.14)
      rack-test (~> 0.5.7)
      tzinfo (~> 0.3.23)
    activemodel (3.0.7)
      activesupport (= 3.0.7)
      builder (~> 2.1.2)
      i18n (~> 0.5.0)
    activerecord (3.0.7)
      activemodel (= 3.0.7)
      activesupport (= 3.0.7)
      arel (~> 2.0.2)
      tzinfo (~> 0.3.23)
    activeresource (3.0.7)
      activemodel (= 3.0.7)
      activesupport (= 3.0.7)
    activesupport (3.0.7)
    archive-tar-minitar (0.5.2)
    arel (2.0.10)
    arrayfields (4.7.4)
    authlogic (3.0.3)
      activerecord (>= 3.0.7)
      activerecord (>= 3.0.7)
    autotest (4.4.6)
      ZenTest (>= 4.4.1)
    autotest-fsevent (0.2.5)
      sys-uname
    autotest-growl (0.2.9)
    autotest-rails-pure (4.1.2)
    builder (2.1.2)
    capybara (0.4.1.2)
      celerity (>= 0.7.9)
      culerity (>= 0.2.4)
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      selenium-webdriver (>= 0.0.27)
      xpath (~> 0.1.3)
    celerity (0.8.9)
    childprocess (0.1.9)
      ffi (~> 1.0.6)
    chronic (0.3.0)
    churn (0.0.13)
      chronic (>= 0.2.3)
      hirb
      json_pure
      main
      ruby_parser (~> 2.0.4)
      sexp_processor (~> 3.0.3)
    colored (1.2)
    columnize (0.3.2)
    configuration (1.2.0)
    cucumber (0.10.2)
      builder (>= 2.1.2)
      diff-lcs (>= 1.1.2)
      gherkin (>= 2.3.5)
      json (>= 1.4.6)
      term-ansicolor (>= 1.0.5)
    cucumber-rails (0.4.1)
      cucumber (>= 0.10.1)
      nokogiri (>= 1.4.4)
      rack-test (>= 0.5.7)
    culerity (0.2.15)
    database_cleaner (0.6.7)
    diff-lcs (1.1.2)
    erubis (2.6.6)
      abstract (>= 1.0.0)
    factory_girl (1.3.3)
    factory_girl_rails (1.0.1)
      factory_girl (~> 1.3)
      railties (>= 3.0.0)
    faker (0.9.5)
      i18n (~> 0.4)
    fattr (2.2.0)
    ffi (1.0.8)
    flay (1.4.2)
      ruby_parser (~> 2.0)
      sexp_processor (~> 3.0)
    flog (2.5.1)
      ruby_parser (~> 2.0)
      sexp_processor (~> 3.0)
    gherkin (2.3.8)
      json (>= 1.4.6)
    haml (3.1.1)
    heroku (2.1.4)
      launchy (>= 0.3.2)
      rest-client (~> 1.6.1)
      term-ansicolor (~> 1.0.5)
    hirb (0.4.5)
    hoptoad_notifier (2.4.9)
      activesupport
      builder
    i18n (0.5.0)
    jquery-rails (1.0.5)
      railties (~> 3.0)
      thor (~> 0.14)
    json (1.5.1)
    json_pure (1.5.1)
    launchy (0.4.0)
      configuration (>= 0.0.5)
      rake (>= 0.8.1)
    linecache19 (0.5.12)
      ruby_core_source (>= 0.1.4)
    mail (2.2.19)
      activesupport (>= 2.3.6)
      i18n (>= 0.4.0)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    main (4.4.0)
      arrayfields (>= 4.7.4)
      fattr (>= 2.1.0)
    metric_fu (2.1.1)
      Saikuro (>= 1.1.0)
      activesupport (>= 2.0.0)
      chronic (~> 0.3.0)
      churn (>= 0.0.7)
      flay (>= 1.2.1)
      flog (>= 2.3.0)
      rails_best_practices (>= 0.6.4)
      rcov (>= 0.8.3.3)
      reek (>= 1.2.6)
      roodi (>= 2.1.0)
      syntax
    mime-types (1.16)
    nokogiri (1.4.4)
    polyglot (0.3.1)
    rack (1.2.2)
    rack-mount (0.6.14)
      rack (>= 1.0.0)
    rack-test (0.5.7)
      rack (>= 1.0)
    rails (3.0.7)
      actionmailer (= 3.0.7)
      actionpack (= 3.0.7)
      activerecord (= 3.0.7)
      activeresource (= 3.0.7)
      activesupport (= 3.0.7)
      bundler (~> 1.0)
      railties (= 3.0.7)
    rails_best_practices (0.9.0)
      activesupport
      colored
      erubis
      haml
      i18n
      ruby-progressbar
      ruby_parser
    railties (3.0.7)
      actionpack (= 3.0.7)
      activesupport (= 3.0.7)
      rake (>= 0.8.7)
      thor (~> 0.14.4)
    rake (0.8.7)
    rcov (0.9.9)
    reek (1.2.8)
      ruby2ruby (~> 1.2)
      ruby_parser (~> 2.0)
      sexp_processor (~> 3.0)
    rest-client (1.6.1)
      mime-types (>= 1.16)
    roodi (2.1.0)
      ruby_parser
    rspec (2.6.0)
      rspec-core (~> 2.6.0)
      rspec-expectations (~> 2.6.0)
      rspec-mocks (~> 2.6.0)
    rspec-core (2.6.1)
    rspec-expectations (2.6.0)
      diff-lcs (~> 1.1.2)
    rspec-mocks (2.6.0)
    rspec-rails (2.6.0)
      actionpack (~> 3.0)
      activesupport (~> 3.0)
      railties (~> 3.0)
      rspec (~> 2.6.0)
    ruby-debug-base19 (0.11.25)
      columnize (>= 0.3.1)
      linecache19 (>= 0.5.11)
      ruby_core_source (>= 0.1.4)
    ruby-debug19 (0.11.6)
      columnize (>= 0.3.1)
      linecache19 (>= 0.5.11)
      ruby-debug-base19 (>= 0.11.19)
    ruby-progressbar (0.0.10)
    ruby2ruby (1.2.5)
      ruby_parser (~> 2.0)
      sexp_processor (~> 3.0)
    ruby_core_source (0.1.5)
      archive-tar-minitar (>= 0.5.2)
    ruby_parser (2.0.6)
      sexp_processor (~> 3.0)
    rubyzip (0.9.4)
    selenium-webdriver (0.2.0)
      childprocess (>= 0.1.7)
      ffi (>= 1.0.7)
      json_pure
      rubyzip
    sexp_processor (3.0.5)
    sqlite3 (1.3.3)
    sqlite3-ruby (1.3.3)
      sqlite3 (>= 1.3.3)
    syntax (1.0.0)
    sys-uname (0.8.5)
    term-ansicolor (1.0.5)
    test-unit (2.3.0)
    thor (0.14.6)
    treetop (1.4.9)
      polyglot (>= 0.3.1)
    tzinfo (0.3.27)
    xpath (0.1.4)
      nokogiri (~> 1.3)

PLATFORMS
  ruby

DEPENDENCIES
  authlogic
  autotest
  autotest-fsevent
  autotest-growl
  autotest-rails-pure
  capybara (>= 0.4.1.2)
  cucumber-rails
  database_cleaner
  factory_girl_rails
  faker
  heroku
  hoptoad_notifier
  jquery-rails (>= 0.2.6)
  launchy
  metric_fu
  rails (>= 3.0.7)
  rspec-rails
  ruby-debug19
  sqlite3-ruby
  test-unit

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

送舟行 2024-11-15 15:14:46

终于解决了这个问题。感谢上帝能够从头开始创建 Rails 项目并一一添加东西。

通过在我的新项目和旧项目之间逐渐添加每组设置和初始化程序,我最终将问题缩小到 rspec.rake 文件:

/lib/tasks/rspec.rake

我正在使用 rspec-rails(即在 Rails 3 上运行的 Rspec 2)。问题是这个 rspec.rake 文件实际上在 rspec-rails 中并不是必需的,而且显然也把事情搞砸了。

为了验证这一点,我运行了 rspec-rails 的全新安装(rails generated rspec:install),并注意到不再创建 rake 文件(我认为它已被吸收到 gem 中)。

所以总而言之,删除 rspec.rake 使一切再次工作 - rake db:migrate 和 rspec spec。

Finally fixed this. Thank god for being able to create rails projects from scratch and add things in one by one.

By gradually adding in each set of settings and initialisers between my new fresh project and old project I finally narrowed the problem down to the rspec.rake file in:

/lib/tasks/rspec.rake

I'm using rspec-rails (i.e. Rspec 2 running on Rails 3). The problem was that this rspec.rake file is not actually required in rspec-rails and apparently also screws things up.

Just to verify this I ran a fresh install of rspec-rails (rails generate rspec:install) and noted that the rake file is no longer created (I think it's been absorbed into the gem).

So in conclusion, deleting rspec.rake made everything work again - both rake db:migrate and rspec spec.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文