Вот результат выполнения deploy.rb с помощью cap deploy, на ubuntu & rvm:
при выполнении ... / bin / bundle install vendor / gem, появляется ошибка:
* executing "cd /vol/www/emclab/current && /home/dtt/.rvm/gems/ruby-1.9.2-p290/bin/bundle install vendor/gems"
servers: ["12.34.56.78"]
[12.34.56.78] executing command
*** [err :: 12.34.56.78] /home/dtt/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find bundler (>= 0) amongst [minitest-1.6.0, rake-0.8.7, rdoc-2.5.8] (Gem::LoadError)
*** [err :: 12.34.56.78] from /home/dtt/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
*** [err :: 12.34.56.78] from /home/dtt/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems.rb:1210:in `gem'
*** [err :: 12.34.56.78] from /home/dtt/.rvm/gems/ruby-1.9.2-p290/bin/bundle:18:in `<main>'
command finished in 624ms
failed: "sh -c 'cd /vol/www/emclab/current && /home/dtt/.rvm/gems/ruby-1.9.2-p290/bin/bundle install vendor/gems'" on 12.34.56.78
Вот вывод cap invoke COMMAND = 'which bundle':
** [out :: 12.34.56.78] /usr/local/bin/bundle
Вот deploy.rb:
set :application, "myapp"
set :repository, "git://github.com/myapp/myapp.git"
set :scm, :git
set :user, "dtt"
set :use_sudo, true
set :scm_passphrase, "phrase"
set :branch, "master"
set :deploy_to, "/vol/www/#{application}"
#set :deploy_via, :remote_cache
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
server "12.34.56.78", :web, :app, :db, :primary => true
#role :web, "your web-server here" # Your HTTP server, Apache/etc
#role :app, "your app-server here" # This may be the same as your `Web` server
#role :db, "your primary db-server here", :primary => true # This is where Rails migrations will run
#role :db, "your slave db-server here"
# if you're still using the script/reaper helper you will need
# these http://github.com/rails/irs_process_scripts
after "deploy", "deploy:bundle_gems"
after "deploy:bundle_gems", "deploy:restart"
# If you are using Passenger mod_rails uncomment this:
namespace :deploy do
task :bundle_gems do
run "cd #{deploy_to}/current && /home/dtt/.rvm/gems/ruby-1.9.2-p290/bin/bundle install vendor/gems"
end
task :start do ; end
task :stop do ; end
task :restart, :roles => :app, :except => { :no_release => true } do
run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
end
end
Есть предложения по поводу ошибки?Спасибо.