hello group,
When I run this Capfile
require 'capistrano/setup'
require 'capistrano/deploy'
namespace :erik do
desc "deploy on eriks pc"
task :rvm do
on roles( :app) do |host|
within '/data/archief/current/rails' do
versie = capture( 'rvm current' )
puts 'version is ' + versie
execute 'rvm', 'current'
end
end
end
end
I get this output, which shows that the capture command is NOT using the within dir (whereas the following execute does):
DEBUG[3efff16c] Running /usr/bin/env if test ! -d /data/archief/current/rails; then echo "Directory does not exist '/data/archief/current/rails'" 1>&2; false; fi on erik
DEBUG[3efff16c] Command: if test ! -d /data/archief/current/rails; then echo "Directory does not exist '/data/archief/current/rails'" 1>&2; false; fi
DEBUG[3efff16c] Finished in 10.413 seconds with exit status 0 (successful).
DEBUG[728cbcf9] Running /usr/bin/env rvm current on erik
DEBUG[728cbcf9] Command: rvm current
DEBUG[728cbcf9] ruby-2.0.0-p353
DEBUG[728cbcf9] Finished in 0.328 seconds with exit status 0 (successful).
version is ruby-2.0.0-p353
INFO[1d833729] Running /usr/bin/env rvm current on erik
DEBUG[1d833729] Command: cd /data/archief/current/rails && /usr/bin/env rvm current
DEBUG[1d833729] Using /home/deploy/.rvm/gems/ruby-1.9.3-p484
DEBUG[1d833729] ruby-1.9.3-p484@rails32
DEBUG[1d833729] Using /home/deploy/.rvm/gems/ruby-1.9.3-p484
INFO[1d833729] Finished in 1.055 seconds with exit status 0 (successful).
Who can explain what I'm doing wrong?
thanks in advance, Ruud
on roles( :app) do |host|
within '/data/archief/current/rails' do
versie = capture( 'rvm current' )
puts 'version is ' + versie
execute 'rvm', 'current'
end
end