2016-06-27 3 views
0

comand 'cap production deploy'를 사용하여 Gemfile.lock에 오류가 있습니다. 어떻게 해결할 수 있습니까?손상된 Gemfile.lock의 오류 Capistrano

터미널 :

cap aborted! 
SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: bundle exit status: 20 
bundle stdout: Your Gemfile.lock is corrupt. The following gem is missing from the DEPENDENCIES 
section: 'activejob' 
bundle stderr: Nothing written 

Gemfile :

source ' https://rubygems.org '

gem 'rails', '4.2.6' 
gem 'pg', '0.18.4' 
gem 'sass-rails' 
gem 'bootstrap-sass' 
gem 'mailboxer' 
gem 'es5-shim-rails' 
gem "font-awesome-rails" 
gem 'carrierwave' 
gem 'file_validators' 
gem 'country_select' 
gem 'html5shiv-rails' 
gem "respond-rails", "~> 1.0" 
gem 'rails_admin' 
gem 'mail_form', '~> 1.5.0.rc' 
gem 'simple_form', '~> 3.0.0.rc' 
gem 'uglifier', '>= 1.3.0' 
gem 'coffee-rails', '~> 4.0.0' 
gem 'omniauth' 
gem 'omniauth-facebook' 
gem 'jquery-rails' 
gem 'turbolinks' 
gem 'jbuilder', '~> 2.0' 
gem 'sdoc', '~> 0.4.0',   group: :doc 

gem 'bcrypt', '~> 3.1.7' 

group :test do 
    gem 'selenium-webdriver', '2.35.1' 
    gem 'capybara', '2.1.0' 
    gem 'factory_girl_rails', '4.2.0' 
    gem 'cucumber-rails', '1.4.0', :require => false 
end 

gem 'devise' 
gem 'tzinfo-data', platforms: [:mingw, :mswin] 
gem 'will_paginate', '~> 3.1' 
gem "dynamic_sitemaps" 
group :development do 
    gem 'capistrano', '3.5.0' 
    gem 'capistrano-rvm' 
    gem 'capistrano-nginx' 
    gem 'capistrano3-puma' 
    gem 'capistrano-rails' 
    gem 'capistrano-rails-db' 
    gem 'capistrano-rails-console' 
    gem 'capistrano-upload-config' 
    gem 'sshkit-sudo' 
end 

Gemfile 잠금 :

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.0.2) 
     sshkit (>= 1.6.1, != 1.7.0) 
    arel (6.0.3) 
    autoprefixer-rails (6.3.6.2) 
     execjs 
    bcrypt (3.1.11) 
    bootstrap-sass (3.3.6) 
     autoprefixer-rails (>= 5.2.1) 
     sass (>= 3.3.4) 
    builder (3.2.2) 
    capistrano (3.5.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-nginx (1.0.0) 
     capistrano (~> 3.1) 
    capistrano-rails (1.1.7) 
     capistrano (~> 3.1) 
     capistrano-bundler (~> 1.1) 
    capistrano-rails-console (1.0.2) 
     capistrano (>= 3.1.0, < 4.0.0) 
    capistrano-rails-db (0.0.2) 
     capistrano-rails (~> 1.1) 
    capistrano-rvm (0.1.2) 
     capistrano (~> 3.0) 
     sshkit (~> 1.2) 
    capistrano-upload-config (0.7.0) 
     capistrano (>= 3.0) 
    capistrano3-puma (1.2.1) 
     capistrano (~> 3.0) 
     puma (>= 2.6) 
    capybara (2.1.0) 
     mime-types (>= 1.16) 
     nokogiri (>= 1.3.3) 
     rack (>= 1.0.0) 
     rack-test (>= 0.5.4) 
     xpath (~> 2.0) 
    carrierwave (0.11.2) 
     activemodel (>= 3.2.0) 
     activesupport (>= 3.2.0) 
     json (>= 1.7) 
     mime-types (>= 1.16) 
     mimemagic (>= 0.3.0) 
    childprocess (0.5.9) 
     ffi (~> 1.0, >= 1.0.11) 
    coffee-rails (4.0.1) 
     coffee-script (>= 2.2.0) 
     railties (>= 4.0.0, < 5.0) 
    coffee-script (2.4.1) 
     coffee-script-source 
     execjs 
    coffee-script-source (1.10.0) 
    concurrent-ruby (1.0.2) 
    countries (1.2.5) 
     currencies (~> 0.4.2) 
     i18n_data (~> 0.7.0) 
    country_select (2.5.2) 
     countries (~> 1.2.0) 
     sort_alphabetical (~> 1.0) 
    cucumber (2.4.0) 
     builder (>= 2.1.2) 
     cucumber-core (~> 1.5.0) 
     cucumber-wire (~> 0.0.1) 
     diff-lcs (>= 1.1.3) 
     gherkin (~> 4.0) 
     multi_json (>= 1.7.5, < 2.0) 
     multi_test (>= 0.1.2) 
    cucumber-core (1.5.0) 
     gherkin (~> 4.0) 
    cucumber-rails (1.4.0) 
     capybara (>= 1.1.2) 
     cucumber (>= 1.2.0) 
     nokogiri (>= 1.5.0) 
     rails (>= 3.0.0) 
    cucumber-wire (0.0.1) 
    currencies (0.4.2) 
    devise (4.1.1) 
     bcrypt (~> 3.0) 
     orm_adapter (~> 0.1) 
     railties (>= 4.1.0, < 5.1) 
     responders 
     warden (~> 1.2.3) 
    diff-lcs (1.2.5) 
    dynamic_sitemaps (2.0.0) 
    erubis (2.7.0) 
    es5-shim-rails (4.0.1) 
     actionpack (>= 3.1) 
     railties (>= 3.1) 
    execjs (2.7.0) 
    factory_girl (4.2.0) 
     activesupport (>= 3.0.0) 
    factory_girl_rails (4.2.0) 
     factory_girl (~> 4.2.0) 
     railties (>= 3.0.0) 
    faraday (0.9.2) 
     multipart-post (>= 1.2, < 3) 
    ffi (1.9.10) 
    file_validators (2.1.0) 
     activemodel (>= 3.0) 
     mime-types (>= 1.0) 
    font-awesome-rails (4.6.3.1) 
     railties (>= 3.2, < 5.1) 
    foreigner (1.7.4) 
     activerecord (>= 3.0.0) 
    gherkin (4.0.0) 
    globalid (0.3.6) 
     activesupport (>= 4.1.0) 
    haml (4.0.7) 
     tilt 
    hashie (3.4.4) 
    html5shiv-rails (0.0.2) 
     railties (>= 3.2.0, < 5.0) 
    i18n (0.7.0) 
    i18n_data (0.7.0) 
    jbuilder (2.5.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) 
    jquery-ui-rails (5.0.5) 
     railties (>= 3.2.16) 
    json (1.8.3) 
    jwt (1.5.1) 
    kaminari (0.17.0) 
     actionpack (>= 3.0.0) 
     activesupport (>= 3.0.0) 
    loofah (2.0.3) 
     nokogiri (>= 1.5.9) 
    mail (2.6.4) 
     mime-types (>= 1.16, < 4) 
    mail_form (1.5.1) 
     actionmailer (>= 3.2, < 5) 
     activemodel (>= 3.2, < 5) 
    mailboxer (0.13.0) 
     carrierwave (>= 0.5.8) 
     foreigner (>= 0.9.1) 
     rails (>= 3.2.0) 
    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) 
    multi_test (0.1.2) 
    multi_xml (0.5.5) 
    multipart-post (2.0.0) 
    nested_form (0.3.2) 
    net-scp (1.2.1) 
     net-ssh (>= 2.6.5) 
    net-ssh (3.2.0) 
    nokogiri (1.6.8) 
     mini_portile2 (~> 2.1.0) 
     pkg-config (~> 1.1.7) 
    oauth2 (1.1.0) 
     faraday (>= 0.8, < 0.10) 
     jwt (~> 1.0, < 1.5.2) 
     multi_json (~> 1.3) 
     multi_xml (~> 0.5) 
     rack (>= 1.2, < 3) 
    omniauth (1.3.1) 
     hashie (>= 1.2, < 4) 
     rack (>= 1.0, < 3) 
    omniauth-facebook (3.0.0) 
     omniauth-oauth2 (~> 1.2) 
    omniauth-oauth2 (1.4.0) 
     oauth2 (~> 1.0) 
     omniauth (~> 1.2) 
    orm_adapter (0.5.0) 
    pg (0.15.1) 
    pkg-config (1.1.7) 
    puma (3.4.0) 
    rack (1.6.4) 
    rack-pjax (0.8.0) 
     nokogiri (~> 1.5) 
     rack (~> 1.1) 
    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) 
    rails_admin (0.8.1) 
     builder (~> 3.1) 
     coffee-rails (~> 4.0) 
     font-awesome-rails (>= 3.0, < 5) 
     haml (~> 4.0) 
     jquery-rails (>= 3.0, < 5) 
     jquery-ui-rails (~> 5.0) 
     kaminari (~> 0.14) 
     nested_form (~> 0.3) 
     rack-pjax (~> 0.7) 
     rails (~> 4.0) 
     remotipart (~> 1.0) 
     safe_yaml (~> 1.0) 
     sass-rails (>= 4.0, < 6) 
    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) 
    remotipart (1.2.1) 
    respond-rails (1.0.1) 
     railties (>= 3.1.0) 
    responders (2.2.0) 
     railties (>= 4.2.0, < 5.1) 
    rspec-core (3.4.4) 
     rspec-support (~> 3.4.0) 
    rspec-expectations (3.4.0) 
     diff-lcs (>= 1.2.0, < 2.0) 
     rspec-support (~> 3.4.0) 
    rspec-mocks (3.4.1) 
     diff-lcs (>= 1.2.0, < 2.0) 
     rspec-support (~> 3.4.0) 
    rspec-rails (3.4.2) 
     actionpack (>= 3.0, < 4.3) 
     activesupport (>= 3.0, < 4.3) 
     railties (>= 3.0, < 4.3) 
     rspec-core (~> 3.4.0) 
     rspec-expectations (~> 3.4.0) 
     rspec-mocks (~> 3.4.0) 
     rspec-support (~> 3.4.0) 
    rspec-support (3.4.1) 
    rubyzip (0.9.9) 
    safe_yaml (1.0.4) 
    sass (3.4.22) 
    sass-rails (5.0.4) 
     railties (>= 4.0.0, < 5.0) 
     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) 
    selenium-webdriver (2.35.1) 
     childprocess (>= 0.2.5) 
     multi_json (~> 1.0) 
     rubyzip (< 1.0.0) 
     websocket (~> 1.0.4) 
    simple_form (3.0.4) 
     actionpack (~> 4.0) 
     activemodel (~> 4.0) 
    sort_alphabetical (1.0.2) 
     unicode_utils (>= 1.2.2) 
    sprockets (3.6.2) 
     concurrent-ruby (~> 1.0) 
     rack (> 1, < 3) 
    sprockets-rails (3.0.4) 
     actionpack (>= 4.0) 
     activesupport (>= 4.0) 
     sprockets (>= 3.0.0) 
    sshkit (1.11.1) 
     net-scp (>= 1.1.2) 
     net-ssh (>= 2.8.0) 
    sshkit-sudo (0.1.0) 
     sshkit (~> 1.8) 
    thor (0.19.1) 
    thread_safe (0.3.5) 
    tilt (2.0.5) 
    turbolinks (2.5.3) 
     coffee-rails 
    tzinfo (1.2.2) 
     thread_safe (~> 0.1) 
    uglifier (3.0.0) 
     execjs (>= 0.3.0, < 3) 
    unicode_utils (1.4.0) 
    warden (1.2.6) 
     rack (>= 1.0) 
    websocket (1.0.7) 
    will_paginate (3.1.0) 
    xpath (2.0.0) 
     nokogiri (~> 1.3) 

PLATFORMS 
    ruby 

DEPENDENCIES 
    bcrypt (~> 3.1.7) 
    bootstrap-sass 
    capistrano (= 3.5.0) 
    capistrano-nginx 
    capistrano-rails 
    capistrano-rails-console 
    capistrano-rails-db 
    capistrano-rvm 
    capistrano-upload-config 
    capistrano3-puma 
    capybara (= 2.1.0) 
    carrierwave 
    coffee-rails (~> 4.0.0) 
    country_select 
    cucumber-rails (= 1.4.0) 
    devise 
    dynamic_sitemaps 
    es5-shim-rails 
    factory_girl_rails (= 4.2.0) 
    file_validators 
    font-awesome-rails 
    html5shiv-rails 
    jbuilder (~> 2.0) 
    jquery-rails 
    mail_form (~> 1.5.0.rc) 
    mailboxer 
    omniauth 
    omniauth-facebook 
    pg (= 0.15.1) 
    rails (= 4.2.6) 
    rails_admin 
    respond-rails (~> 1.0) 
    rspec-rails 
    sass-rails 
    sdoc (~> 0.4.0) 
    selenium-webdriver (= 2.35.1) 
    simple_form (~> 3.0.0.rc) 
    sshkit-sudo 
    turbolinks 
    tzinfo-data 
    uglifier (>= 1.3.0) 
    will_paginate (~> 3.1) 

업데이트 Gemfile. Gemfile.lock을 제거하고 블록 생성에서 'pg'gem을 편집하고 '번들 설치'를 다시 사용하면 도움이되지 않습니다.

+0

로컬'번들 install '이다 실행할 수 있는지 확인하고 커밋 Gemfile * 및 * Gemfile.lock을 배포하려는 원격 지점으로 푸시합니다. –

+0

솔루션은 번들러를 다운 그레이드했습니다. 하지만 지금은 다른 오류가 발생했습니다. - Gem :: LoadError : 데이터베이스 어댑터에 'postgresql'이 지정되었지만 보석이로드되지 않았습니다. 'gem 'pg''을 Gemfile에 추가하십시오. –

+0

': development' 그룹에'pg'가 있습니다. 이것은 틀린 것입니다. 그것을 Gemfile의 최상위 레벨로 옮기십시오. –

답변

0

Gemfile과 Gemfile.lock이 어떻게 생겼는지 모른 채 말하기는 어렵지만 Gemfile.lock 파일을 삭제하고 bundle install을 실행하면 문제가 해결 될 수 있습니다!

당신은 말했다 :

solution was a downgrade the bundler. but now i got other error. - Gem::LoadError: Specified 'postgresql' for database adapter, but the gem is not loaded. Add gem 'pg' to your Gemfile

가해야 할 일 :

당신의 Gemfile에 위에서 언급 한, 난 당신이 그룹 만 :development:test에 대한 gem 'pg', '0.15.1'을 추가 한 것을 알 수있다.

cap production deploy을 실행하면 Rails 앱을 프로덕션 모드로 배포하고 :development:test 그룹의 보석은 무시됩니다.

즉, group :development, :test do 블록에서 PostgreSQL의 보석 (gem 'pg')를 이동하고 Gemfile의 상단을 향해 넣어,이 문제를 해결하려면 :

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 
gem 'rails', '4.2.6' 

# Use postgresql as the database for Active Record 
gem 'pg' 

# Other gems 
# Use SCSS for stylesheets 
gem 'sass-rails' 
gem 'bootstrap-sass' 
... 
+0

) gemfile 잠금을 삭제하고 번들을 사용하지 마십시오. 동일한 문제 ( –

+0

어쨌든 ..... 같은 문제 (나는 그것을 고치는 법을 모릅니다) –

+0

나중에'번들 설치 '를 다시 실행 했습니까? ? 질문 : Gemfile을 업데이트 할 수 있습니까? – Finn