2011-01-11 7 views
3

CapistranoでDreamhostにローカルに動作するRails 3アプリケーションをデプロイしようとしています。 ローカルのアプリのルートに 'cap deploy -v'を実行すると、これまで 'bundle install'で鳴る前に取得できます。Capistranoを使用してDreamweaverにRails 3アプリをデプロイするときにバンドルインストールが失敗する

**トランザクション::** [abunchofletters.co.uk ::アウト]が[email protected]'s起動パスワード: パスワード:** [次のエラーメッセージの最後ですabuchofletters.co.uk :: out] ** [abunchofletters.co.uk :: out] HEADは現在62f9cdbにあります。 ** [out :: abunchofletters.co.uk] sh:bundle:コマンドではありません見つかりました * [展開:update_code]ロールバック 失敗:「sh -c」バンドルインストール--gemfile /home/my_username/abunchofletters.co.uk/releases/20110111100145/Gemfile --path/home/my_username/abunchofletters .co.uk/

私のサーバーにSSHをインストールしてgemリストを確認すると、bundler 1.0.7が表示されます。 Ruby 1.8.7、Rails 3.0.3、RubyGems 1.3.6]をインストールしています。これはRailsアプリケーションとCapistranoを導入した私の最初の経験であるため、私は無知に近いですが、パスや変数が正しく設定されていないと思います。ここで

は私のdeploy.rb [それほど古くなる可能性が http://railstips.org/blog/archives/2008/12/14/deploying-rails-on-dreamhost-with-passenger/以下から作成]をです:

require "bundler/capistrano" # http://gembundler.com/deploying.html 

default_run_options[:pty] = true 

# be sure to change these 
set :user,  'my_username' 
set :domain,  'abunchofletters.co.uk' 
set :application, 'abunchofletters' 

# the rest should be good 
set :repository, "#{user}@#{domain}:git/#{application}.git" 
set :deploy_to, "/home/#{user}/#{domain}" 
set :deploy_via, :remote_cache 
set :scm, 'git' 
set :branch, 'master' 
set :git_shallow_clone, 1 
set :scm_verbose, true 
set :use_sudo, false 

server domain, :app, :web 
role :db, domain, :primary => true 

namespace :deploy do 
    task :restart do 
    run "touch #{current_path}/tmp/restart.txt" 
    end 
end 

任意のアイデアはどのように進行しますか?それ以上の情報がある場合は、私にプロンプ​​トするだけで、私はそれを供給します。

答えて

0

私が思いついた解決策に満足しているわけではありませんが、デプロイメントがうまく機能していて、アップデートするためにバンドラを手に入れました。バンドル・ロック/アンロックが廃止されているものの、http://grigio.org/deploy_rails_3_passenger_apache_dreamhost:宝石のタスクここで見られた:

#require "bundler/capistrano" 

default_run_options[:pty] = true 

# be sure to change these 
set :user,  'futureproof' 
set :domain,  'abunchofletters.co.uk' 
set :application, 'abunchofletters' 

# the rest should be good 
set :repository, "#{user}@#{domain}:git/#{application}.git" 
set :deploy_to, "/home/#{user}/#{domain}" 
set :deploy_via, :remote_cache 
set :shared_path, "/home/#{user}/.gems" 
set :scm, 'git' 
set :branch, 'master' 
set :git_shallow_clone, 1 
set :scm_verbose, true 
set :use_sudo, false 

server domain, :app, :web 
role :db, domain, :primary => true 

namespace :deploy do 
    desc "expand the gems" 
    task :gems, :roles => :web, :except => { :no_release => true } do 
    run "cd #{current_path}; #{shared_path}/bin/bundle unlock" 
    run "cd #{current_path}; nice -19 #{shared_path}/bin/bundle install vendor/" # nice -19 is very important otherwise DH will kill the process! 
    run "cd #{current_path}; #{shared_path}/bin/bundle lock" 
    end 

    task :restart do 
    run "touch #{current_path}/tmp/restart.txt" 
    end 
end 

は、ここに私の更新deploy.rbです。単にバンドルのインストール/アップデートで置き換えることができるかもしれませんが、非難されたのは今夜です。

関連する問題