私のサーバーと開発マシンの間で自動展開を行うためにCapistranoで遊んでいました。私はCapistranoがbundle execコマンドを使ってサーバを起動できないように見えることを除いて、ほとんど設定しました。私はいつも、次のエラーを受信しています:Capistranoを薄いサーバーで展開
EDIT:configファイルを今だけ関連性の最後のセクションをコピーし/var/www/apps/current/thin.ymlで
... * executing "sudo -p 'sudo password: ' bundle exec thin start -C /var/www/thin.config.yml" servers: ["85.255.206.157"] [85.255.206.157] executing command ** [out :: 85.255.206.157] Could not locate Gemfile command finished in 216ms failed: "sh -c 'sudo -p '\\''sudo password: '\\'' bundle exec thin start -C /var/www/thin.config.yml'" on 85.255.206.157
を常駐します。ファイルのコピー全体などは正常に動作します。失敗していると思われるクラスタを開始するだけです。
EDIT:ファイルには、次のように変更されました:
require "bundler/capistrano"
# define the application and Version Control settings
set :application, "ESCO Matching Demo"
set :repository, "svn://192.168.33.70/RubyOnRails/ESCO"
set :deploy_via, :copy
# Set the login credentials for Capistrano
set :user, "kurt"
# Tell Capistrano where to deploy
set :deploy_to, "/var/www/apps"
# Tell Capistrano the servers it can play with
server "85.255.206.157", :app, :web, :db, :primary => true
# Generate an additional task to fire up the thin clusters
namespace :deploy do
desc "Start the Thin processes"
task :start do
sudo "bundle exec thin start -C thin.yml"
end
desc "Stop the Thin processes"
task :stop do
sudo "bundle exec thin stop -C thin.yml"
end
desc "Restart the Thin processes"
task :restart do
sudo "bundle exec thin restart -C thin.yml"
end
desc "Create a symlink from the public/cvs folder to the shared/system/cvs folder"
task :update_cv_assets, :except => {:no_release => true} do
run "ln -s #{shared_path}/cvs #{latest_release}/public/cvs"
end
end
# Define all the tasks that need to be running manually after Capistrano is finished.
after "deploy:finalize_update", "deploy:update_cv_assets"
after "deploy", "deploy:migrate"
EDIT:これは私のthin.ymlファイルです
ここ はすべてカピストラーノのものを扱う私のdeploy.rbファイルです---
pid: tmp/pids/thin.pid
address: 0.0.0.0
timeout: 30
wait: 30
port: 4000
log: log/thin.log
max_conns: 1024
require: []
environment: production
max_persistent_conns: 512
server: 4
daemonize: true
chdir: /var/www/apps/current
EDIT: 次のような問題が発生している今:
最後のステップに私のシステムからキャップdeployコマンドを実行しているとき、私はGemFileエラーを見つけることができません受けてい:移行が行われていない
サーバのブート
私ができます」もはや手動でクラスタを起動するように見える。シンのインスタンスが1つだけ起動しています。
UPDATE:ここに は私が展開していますサーバーから宝石のenvの設定です。この情報は、キャップシェルを使用し、次にコマンドを実行することによって得られる。
==================================================================== Welcome to the interactive Capistrano shell! This is an experimental feature, and is liable to change in future releases. Type 'help' for a summary of how to use the shell. -------------------------------------------------------------------- cap> echo $PATH [establishing connection(s) to 85.255.206.157] Password: ** [out :: 85.255.206.157] /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games cap> gem env ** [out :: 85.255.206.157] RubyGems Environment: ** [out :: 85.255.206.157] - RUBYGEMS VERSION: 1.3.6 ** [out :: 85.255.206.157] - RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux] ** [out :: 85.255.206.157] - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8 ** [out :: 85.255.206.157] - RUBY EXECUTABLE: /usr/bin/ruby1.8 ** [out :: 85.255.206.157] - EXECUTABLE DIRECTORY: /usr/bin ** [out :: 85.255.206.157] - RUBYGEMS PLATFORMS: ** [out :: 85.255.206.157] - ruby ** [out :: 85.255.206.157] - x86_64-linux ** [out :: 85.255.206.157] - GEM PATHS: ** [out :: 85.255.206.157] - /usr/lib/ruby/gems/1.8 ** [out :: 85.255.206.157] - /home/kurt/.gem/ruby/1.8 ** [out :: 85.255.206.157] - GEM CONFIGURATION: ** [out :: 85.255.206.157] - :update_sources => true ** [out :: 85.255.206.157] - :verbose => true ** [out :: 85.255.206.157] - :benchmark => false ** [out :: 85.255.206.157] - :backtrace => false ** [out :: 85.255.206.157] - :bulk_threshold => 1000 ** [out :: 85.255.206.157] - REMOTE SOURCES: ** [out :: 85.255.206.157] - http://rubygems.org/
は、多分それは大丈夫だ、同じ問題が発生している-C薄いです.yml " – Shtirlic
は次のプロジェクトでスピンを与えて、コマンドをより読みやすくするかもしれません。 –