2015-01-03 6 views
2

rvm1-capistrano를 사용하여 Capistrano를 v3으로 업데이트하고 gemset에 오류가 발생했습니다.capistrano3 작업이 gemfile을 보유하지 않음

Capfile의 관련 섹션 :

set :rvm_type, :user 
set :rvm_ruby_version, 'ruby-2.1.5' 
set :rvm_ruby_gemset, '[email protected]' 
set :branch, ENV["BRANCH_NAME"] || ENV["TAG_NAME"] || "master" 
set :pty, true 

다른 설정은 호스트, repo_url 등을들 수있다 :

require 'rvm1/capistrano3' 
#require 'capistrano/bundler' 
require 'capistrano/rails/assets' 
require 'capistrano/rails/migrations' 

내 deploy.rb의 모습.

gem "customgem", :git => '[email protected]:customgem/customget.git', :branch => '745-capistrano-3-upgrade' 
:

DEBUG[bc474425] Command: cd /home/user/www/server-test/releases/20150103023617 && (RAILS_ENV=stevedev /home/usr/www/mdm-server-test/rvm1scripts/rvm-auto.sh . rake assets:precompile) 
DEBUG[bc474425]  [email protected]:customgem/customgem.git (at 745-capistrano-3-upgrade) is not yet checked out. Run `bundle install` first. 

는 Gemfile 메인 섹션에서 보석 (사용자 정의 내장 엔진)을 지정 : 레이크 자산 : 작업이 적절한 gemset을 찾을 수 없기 때문에 사전 컴파일 작업은 다음 오류와 함께 실패

원격 서버에 실제로 bundle install을 실행 했으므로 gemset이 실제로 원격 서버에 있다는 것을 알고 있습니다.

나는 cap customenv rvm1:check을 실행하고 다음과 같은 출력 recevied했습니다

DEBUG[bad87e27] Finished in 1.862 seconds with exit status 0 (successful). 
ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux] 

은 그래서 적절한 설정을 않는 카피 스트라 노 작업을 나타납니다.

내가 설정하지 않은 변수가 있습니까?

답변

-1

https://github.com/rvm/rvm1-capistrano3/issues/6#issuecomment-29296421

이 글의 코드는이 사용자 정의 모자 작업을 추가하여, 나를 위해 일한 :이 링크는 질문에 대답 수 있지만

set :bundle_without, %w{development test}.join(' ') 
set :bundle_roles, :all 
namespace :bundler do 
    desc "Install gems with bundler." 
    task :install do 
    on roles fetch(:bundle_roles) do 
     within release_path do 
     execute :bundle, "install", "--without #{fetch(:bundle_without)}" 
     end 
    end 
    end 
end 
before 'deploy:updated', 'bundler:install' 
+1

을, 그 대답의 본질적인 부분을 포함하는 것이 좋습니다 여기에 참조 용 링크를 제공하십시오. 링크 된 페이지가 변경되면 링크 전용 답변이 유효하지 않게 될 수 있습니다. - [검토 중] (리뷰/저품목/14345248) – etienne

+0

@etienne 업데이트 됨, 고객님의 의견에 감사드립니다. – SteenJobs