3

当我执行捆绑更新 rails 时,我收到此错误:

Bundler could not find compatible versions for gem "activesupport":
  In Gemfile:
    rails (= 3.2.11) x86-mingw32 depends on
      activesupport (= 3.2.11) x86-mingw32

    activesupport (3.1.0)

这是我的 gemFile,任何帮助都会受到赞赏 :)

source 'http://rubygems.org'

gem 'rails' , '3.2.11'
gem "heroku"
gem 'thin'
gem 'devise'#, '1.5.2'
gem 'will_paginate', '~> 3.0.2'
#gem 'nested_form', :git => 'git://github.com/fxposter/nested_form.git'
gem "simple_form"
gem "cancan"
gem 'kaminari'
gem 'foreigner'
gem "cocoon"
gem 'client_side_validations'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails', "  ~> 3.1.0"
  gem 'coffee-rails', "~> 3.1.0"
  gem 'uglifier'
end

gem "jquery-rails"
gem "validate_url", "~> 0.2.0"
gem 'pg', :group => [:production]
gem 'haml'
# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
group :test, :development do
  gem 'sqlite3'
  gem 'turn', :require => false
  gem "rspec-rails", "2.7"
  #gem "rspec"
  gem "spork", "> 0.9.0.rc"
  gem 'guard-spork'
  #gem "webrat", "~> 0.7.3"
  gem 'rb-fsevent' # Not mandatory for guard to work, which is why it's not a dependency, but it is an optimization
  #gem "guard-spork"
  #gem 'minitest'
  gem "factory_girl_rails", "~> 1.2"
  #gem "webrat-rspec-rails"
  gem "mocha"
  gem 'capybara' #, :git => 'git://github.com/jnicklas/capybara.git'
  gem 'database_cleaner'
  gem 'launchy'
  gem "capybara-webkit"
  #gem 'rspec-multi-mock', :git => 'git://github.com/endeepak/rspec-multi-mock.git'
end

group :test do
  #gem 'ruby-debug19', :require => 'ruby-debug'
end

gem 'execjs'
gem 'therubyracer'
4

1 回答 1

3

首先你必须删除Gemfile.lock

  • 然后更新 Gemfile 以包含 rails 3.2.11

  • 进入项目目录

  • bundle install

这可能会解决您的问题

于 2013-01-15T05:41:38.247 回答