Found it. A similar post made me try the capture *without spaces*, with an
array, like
versie = capture( 'rvm', 'current' )
Which DOES work, that is, the command is prepended by a cd. Not sure if
this is a bug, or a feature. Nevertheless I'm glad I got it working.
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
>
output is now (snippet)
DEBUG[d49114d7] Running /usr/bin/env rvm current on erik
DEBUG[d49114d7] Command: cd /data/archief/current/rails && /usr/bin/env rvm
current
DEBUG[d49114d7] Using /home/deploy/.rvm/gems/ruby-1.9.3-p484
DEBUG[d49114d7] ruby-1.9.3-p484@rails32
DEBUG[d49114d7] Using /home/deploy/.rvm/gems/ruby-1.9.3-p484
DEBUG[d49114d7] Finished in 1.059 seconds with exit status 0 (successful).
versie is ruby-1.9.3-p484@rails32
--
You received this message because you are subscribed to the Google Groups
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web, visit
https://groups.google.com/d/msgid/capistrano/a4b54dfe-ff4e-43e1-9191-702ef4820717%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.