为什么捆绑更新需要这么长时间?

时间:2014-06-08 17:49:49

标签: ruby-on-rails-3

我正在升级我的Rails应用程序以使用Ruby 2.1并更新我的宝石。但是,当我运行bundle更新时,需要花费相当长的时间才能完成(最后一次运行3个多小时)。

非常感谢任何解决这个问题的建议。

这是我当前的gemfile:

source 'http://rubygems.org'

gem 'rails', '~> 3.2.11'
gem 'mysql2', '~>0.3.10'
gem 'json', '1.7.7'
gem 'will_paginate', '~> 3.0'
gem 'carrierwave'
gem "fog", "~> 1.3.1"
gem 'gibbon'
gem 'nokogiri'
gem 'premailer-rails3'
gem 'pg'
gem 'aws-s3'
gem 'amazon-ec2'
# Use unicorn as the app server
gem 'unicorn'
gem 'sidekiq'
gem 'rufus-scheduler'
gem 'exception_notification'
gem 'haml', '>= 4.0.0.rc.1'
gem 'html2haml'
gem 'state_machine'
gem 'garb', :git => 'git://github.com/Sija/garb.git'
gem "activerecord-import", ">= 0.2.0"
gem "hashie"
gem 'draper', '~> 1.0'
gem 'dotenv-rails', :groups => [:development, :test]
gem 'airbrake'
gem 'newrelic_rpm'

gem 'devise', '~> 2.2.4'
gem 'acts_as_tenant', :git => 'git://github.com/ErwinM/acts_as_tenant.git'

gem 'bourbon'
gem 'sass'
gem 'neat'
gem 'bitters'
gem 'middleman'

group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'handlebars_assets', :git => 'git://github.com/leshill/handlebars_assets.git'
  gem 'jquery-rails', '~> 2.0.1'
  gem 'uglifier', '>= 1.0.3'
end

group :test do
  #gem 'webmock'
  gem 'vcr'
  gem 'launchy'
  gem 'database_cleaner'
  gem 'capybara', '2.0.0'
  gem 'shoulda'
end

group :development, :test do
  gem 'faker'
  gem "rspec-rails", "2.14.0"
  gem "factory_girl_rails", "~> 4.0", :require => false
  gem 'spork', '~> 1.0rc'
  gem 'guard-livereload'
  gem 'guard-jasmine'
  gem 'guard-spork'
  gem 'guard-rspec'
  gem 'jasminerice', :git => 'git://github.com/bradphelan/jasminerice.git'
end

group :development do
  gem 'rb-inotify', :require => false
  gem 'rb-fsevent', :require => false
  gem 'rb-fchange', :require => false
  gem 'pry'
end

这是我收到的最后一个结果:

Bundler could not find compatible versions for gem "thor":
  In Gemfile:
    rails (~> 3.2.11) ruby depends on
      railties (= 3.2.11) ruby depends on
        thor (< 2.0, >= 0.14.6) ruby

    jquery-rails (~> 2.0.1) ruby depends on
      thor (0.14.0)

1 个答案:

答案 0 :(得分:1)

您包含具有不兼容依赖项的gem。您不能同时拥有jquery-rails ~> 2.0.1rails ~> 3.2.11,因为他们对Thor gem的版本有相互排斥的要求。

我建议删除jquery-rails的显式版本要求让Rails根据其依赖关系选择所需的版本。