2011-12-27 115 views
0

之前我使用Capistrano的,而每當寶石,在一個新的部署到服務器,而無需安裝,只要創業板,Capistrano的嘗試運行防止whenenver寶石寶石從安裝

每當運行--clear-的crontab - 明確的crontab

耙寶石BEFORE:install命令已運行,其清晰的(從this),這個命令運行後deploy_code但這樣做我的命令安裝寶石(下)..

after "deploy:update_code", "deploy:symlink_config" 

deploy.task :symlink_config, :roles => :app do 
    # create a symlink to the database.yml file located in the shared_path 
    run "ln -nsf #{shared_path}/config/database.yml #{current_release}/config" 

    # install any missing gems 
    run "cd #{current_release} && sudo rake gems:install --trace RAILS_ENV=#{rails_env}" 

    # migrate the database 
    run "cd #{current_release} && rake db:migrate --trace RAILS_ENV=#{rails_env}" 
end 

有沒有方法來訂購這些tas KS,因爲在寒冷的部署,我總是得到每當:未發現,並具有遠程服務器

回答

0

我最終什麼事做的是消除從配置\ deploy.rb的require "whenever/capistrano"避免手動安裝,只要創業板「自動」部署。相反,我添加了一個執行--clear-crontab--update-crontab的任務。這會按照我設置的順序執行。

我已將其基於this post,它處理稍有不同的問題,但具有相同的解決方案 - 不使用與Capistrano的「自動」集成。