Home Articles

RAILS:Bundler找不到gem“actionpack”的兼容版本:

Asked
Viewed 818 times
3

当我尝试“捆绑”时我得到了这个

获取http://rubygems.org/Bundler的源索引找不到gem“actionpack”的兼容版本:在Gemfile中:sass-rails(= 3.1.5)ruby依赖于
actionpack(〜> 3.1.0)ruby

rails(= 3.2.0)ruby取决于
actionpack(3.2.0)

而且,这是我的Gemfile:

source 'http://rubygems.org'

gem 'rails', '3.2.0'

group :development do
  gem 'sqlite3', '1.3.4'
  gem 'rspec-rails', '2.7.0'
  gem 'guard-rspec', '0.5.5'
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '3.1.5'
  gem 'coffee-rails', '3.1.1'
  gem 'uglifier', '1.0.3'
end

gem 'jquery-rails', '1.0.18'

group :test do
  # Pretty printed test output
  gem 'turn', '0.8.2', :require => false
  gem 'rspec-rails', '2.7.0'
  gem 'capybara', '1.1.2'
  gem 'rb-fsevent', '0.4.3.1', :require => false
  gem 'growl', '1.0.3'
end

需要帮忙 . 谢谢!

2 Answers

  • 6

    3.2.0发行说明指出你应该升级这些宝石:

    sass-rails ~> 3.2.3
    coffee-rails ~> 3.2.1
    

    http://guides.rubyonrails.org/3_2_release_notes.html

  • 0

    sass-rails的3.2.3版本将支持Rails 3.2,因此请将Gemfile更改为:

    gem 'sass-rails',   '~> 3.2.3'
    

    您可能也想放松其他gem版本,因此在升级Rails时它们可以自动升级 . 它是包含版本的Gemfile.lock,因此只有在您有充分理由的情况下才能在Gemfile中指定gem版本 .

Related