上限生产部署| Gemfile.lock腐败

cap production deploy | Gemfile.lock corrupt

尝试在我的第一个托管 rails 应用程序上使用上限生产部署。我已经 运行 进入下面的错误消息,希望有人能提供帮助。

错误信息:

DEBUG [86275c15]       Your Gemfile.lock is corrupt. The following gem is missing from the DEPENDENCIES
section: 'nokogiri'

我已经从我的 gemfile 和锁文件中删除了 nokogiri。我已经尝试了一切。阅读类似的错误消息,但无法让 cap production deploy 工作。

GEM 文件

source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.6'
gem 'mysql2', '>= 0.3.13', '< 0.5'
gem 'bundler', '~> 1.12', '>= 1.12.5'



# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

gem 'nested_scaffold', '~> 1.0'
gem 'paperclip', '~> 5.0'
gem 'cocoon', '~> 1.2', '>= 1.2.9'
gem 'bootstrap-sass', '~> 3.3', '>= 3.3.6'

gem 'mini_portile2', '~> 2.1'
gem 'pkg-config', '~> 1.1', '>= 1.1.7'


group :development, :production do
 gem 'capistrano', '~> 3.6'
 gem 'capistrano-bundler', '~> 1.1', '>= 1.1.4'
 gem 'capistrano-rails', '~> 1.1', '>= 1.1.7'
 gem 'capistrano-rbenv', '~> 2.0', '>= 2.0.4', github: "capistrano/rbenv"

end

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc


group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'
end



group :development do
  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

GEMFILE.LOCK

GIT
  remote: git://github.com/capistrano/rbenv.git
  revision: e056efc0c361cc15b76ff961d6c5f65ed5e2c57e
  specs:
    capistrano-rbenv (2.0.4)
      capistrano (~> 3.1)
      sshkit (~> 1.3)

GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (4.2.6)
      actionpack (= 4.2.6)
      actionview (= 4.2.6)
      activejob (= 4.2.6)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 1.0, >= 1.0.5)
    actionpack (4.2.6)
      actionview (= 4.2.6)
      activesupport (= 4.2.6)
      rack (~> 1.6)
      rack-test (~> 0.6.2)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    actionview (4.2.6)
      activesupport (= 4.2.6)
      builder (~> 3.1)
      erubis (~> 2.7.0)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    activejob (4.2.6)
      activesupport (= 4.2.6)
      globalid (>= 0.3.0)
    activemodel (4.2.6)
      activesupport (= 4.2.6)
      builder (~> 3.1)
    activerecord (4.2.6)
      activemodel (= 4.2.6)
      activesupport (= 4.2.6)
      arel (~> 6.0)
    activesupport (4.2.6)
      i18n (~> 0.7)
      json (~> 1.7, >= 1.7.7)
      minitest (~> 5.1)
      thread_safe (~> 0.3, >= 0.3.4)
      tzinfo (~> 1.1)
    airbrussh (1.1.0)
      sshkit (>= 1.6.1, != 1.7.0)
    arel (6.0.3)
    autoprefixer-rails (6.3.7)
      execjs
    binding_of_caller (0.7.2)
      debug_inspector (>= 0.0.1)
    bootstrap-sass (3.3.7)
      autoprefixer-rails (>= 5.2.1)
      sass (>= 3.3.4)
    builder (3.2.2)
    byebug (9.0.5)
    capistrano (3.6.0)
      airbrussh (>= 1.0.0)
      capistrano-harrow
      i18n
      rake (>= 10.0.0)
      sshkit (>= 1.9.0)
    capistrano-bundler (1.1.4)
      capistrano (~> 3.1)
      sshkit (~> 1.2)
    capistrano-harrow (0.5.2)
    capistrano-rails (1.1.7)
      capistrano (~> 3.1)
      capistrano-bundler (~> 1.1)
    climate_control (0.0.3)
      activesupport (>= 3.0)
    cocaine (0.5.8)
      climate_control (>= 0.0.3, < 1.0)
    cocoon (1.2.9)
    coffee-rails (4.1.1)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0, < 5.1.x)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.10.0)
    concurrent-ruby (1.0.2)
    debug_inspector (0.0.2)
    erubis (2.7.0)
    execjs (2.7.0)
    globalid (0.3.7)
      activesupport (>= 4.1.0)
    i18n (0.7.0)
    jbuilder (2.6.0)
      activesupport (>= 3.0.0, < 5.1)
      multi_json (~> 1.2)
    jquery-rails (4.1.1)
      rails-dom-testing (>= 1, < 3)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    json (1.8.3)
    loofah (2.0.3)
      nokogiri (>= 1.5.9)
    mail (2.6.4)
      mime-types (>= 1.16, < 4)
    mime-types (3.1)
      mime-types-data (~> 3.2015)
    mime-types-data (3.2016.0521)
    mimemagic (0.3.1)
    mini_portile2 (2.1.0)
    minitest (5.9.0)
    multi_json (1.12.1)
    mysql2 (0.4.4-x86-mingw32)
    nested_scaffold (1.0.0)
    net-scp (1.2.1)
      net-ssh (>= 2.6.5)
    net-ssh (3.2.0)
    nokogiri (1.6.8-x86-mingw32)
      mini_portile2 (~> 2.1.0)
      pkg-config (~> 1.1.7)
    paperclip (5.0.0)
      activemodel (>= 4.2.0)
      activesupport (>= 4.2.0)
      cocaine (~> 0.5.5)
      mime-types
      mimemagic (~> 0.3.0)
    pkg-config (1.1.7)
    rack (1.6.4)
    rack-test (0.6.3)
      rack (>= 1.0)
    rails (4.2.6)
      actionmailer (= 4.2.6)
      actionpack (= 4.2.6)
      actionview (= 4.2.6)
      activejob (= 4.2.6)
      activemodel (= 4.2.6)
      activerecord (= 4.2.6)
      activesupport (= 4.2.6)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.2.6)
      sprockets-rails
    rails-deprecated_sanitizer (1.0.3)
      activesupport (>= 4.2.0.alpha)
    rails-dom-testing (1.0.7)
      activesupport (>= 4.2.0.beta, < 5.0)
      nokogiri (~> 1.6.0)
      rails-deprecated_sanitizer (>= 1.0.1)
    rails-html-sanitizer (1.0.3)
      loofah (~> 2.0)
    railties (4.2.6)
      actionpack (= 4.2.6)
      activesupport (= 4.2.6)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (11.2.2)
    rdoc (4.2.2)
      json (~> 1.4)
    sass (3.4.22)
    sass-rails (5.0.6)
      railties (>= 4.0.0, < 6)
      sass (~> 3.1)
      sprockets (>= 2.8, < 4.0)
      sprockets-rails (>= 2.0, < 4.0)
      tilt (>= 1.1, < 3)
    sdoc (0.4.1)
      json (~> 1.7, >= 1.7.7)
      rdoc (~> 4.0)
    sprockets (3.7.0)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.1.1)
      actionpack (>= 4.0)
      activesupport (>= 4.0)
      sprockets (>= 3.0.0)
    sshkit (1.11.1)
      net-scp (>= 1.1.2)
      net-ssh (>= 2.8.0)
    thor (0.19.1)
    thread_safe (0.3.5)
    tilt (2.0.5)
    turbolinks (5.0.0)
      turbolinks-source (~> 5)
    turbolinks-source (5.0.0)
    tzinfo (1.2.2)
      thread_safe (~> 0.1)
    tzinfo-data (1.2016.6)
      tzinfo (>= 1.0.0)
    uglifier (3.0.0)
      execjs (>= 0.3.0, < 3)
    web-console (2.3.0)
      activemodel (>= 4.0)
      binding_of_caller (>= 0.7.2)
      railties (>= 4.0)
      sprockets-rails (>= 2.0, < 4.0)

PLATFORMS
  x86-mingw32

DEPENDENCIES
  bootstrap-sass (~> 3.3, >= 3.3.6)
  bundler (~> 1.12, >= 1.12.5)
  byebug
  capistrano (~> 3.6)
  capistrano-bundler (~> 1.1, >= 1.1.4)
  capistrano-rails (~> 1.1, >= 1.1.7)
  capistrano-rbenv (~> 2.0, >= 2.0.4)!
  cocoon (~> 1.2, >= 1.2.9)
  coffee-rails (~> 4.1.0)
  jbuilder (~> 2.0)
  jquery-rails
  mini_portile2 (~> 2.1)
  mysql2 (>= 0.3.13, < 0.5)
  nested_scaffold (~> 1.0)
  paperclip (~> 5.0)
  pkg-config (~> 1.1, >= 1.1.7)
  rails (= 4.2.6)
  sass-rails (~> 5.0)
  sdoc (~> 0.4.0)
  turbolinks
  tzinfo-data
  uglifier (>= 1.3.0)
  web-console (~> 2.0)

BUNDLED WITH
   1.12.5

显然,这是由于 Bundler 问题造成的。 suggests using Bundler 1.10.6. Bundler's issue #4467: Your Gemfile.lock is corrupt. The following gem is missing from the DEPENDENCIES section 还建议使用 1.10.6.

我卸载了所有版本的 Bundler,然后只安装了 1.10.6。之后,对 Heroku 的部署通过了。