【问题标题】:Rails 2.3.8: RailsKit testing breaks with error saying there is a conflict between rails 2.3.8 and non-existant rails 3Rails 2.3.8:RailsKit 测试因错误而中断,表明 rails 2.3.8 和不存在的 rails 3 之间存在冲突
【发布时间】:2011-06-24 04:14:06
【问题描述】:

我正在使用 SASS RailsKit

   /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:283:in `activate': Unable to activate rspec-rails-2.6.1, because activesupport-2.3.8 conflicts with activesupport (~> 3.0), actionpack-2.3.8 conflicts with actionpack (~> 3.0) (Gem::LoadError)
        from /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:212:in `try_activate'
        from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:52:in `require'
        from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:158:in `require'
        from ./spec/controllers/../spec_helper.rb:6
        from ./spec/controllers/accounts_controller_spec.rb:1:in `require'
        from ./spec/controllers/accounts_controller_spec.rb:1
        from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:15:in `load'
        from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:15:in `load_files'
        from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:14:in `each'
        from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:14:in `load_files'
        from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner/options.rb:134:in `run_examples'
        from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner/command_line.rb:9:in `run'
        from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.3.2/bin/spec:5

我对事物的看法:

ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-darwin10]
/opt/local/bin/ruby
gem version 1.6.0
/opt/local/bin/gem
activerecord (2.3.8)
activeresource (2.3.8)
activesupport (2.3.8)
actionmailer (2.3.8)
actionpack (2.3.8)
rails (2.3.8)
rspec-rails (2.6.1, 1.3.4)

知道是什么原因造成的吗?

【问题讨论】:

    标签: ruby-on-rails sass


    【解决方案1】:

    解决此问题的最佳方法是使用 RVM 并为每个应用程序提供一个 gemset

    RVM Best Pratices

    rspec-rails (2.6.1) 需要 Rails 3

    gem uninstall rspec-rails
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多