Running remote commands with Vlad fails

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi there,

I’m currently trying to get comfortable with automated application
deployment using Vlad. I’m sure I’m missing something absolutely
obvious, but it seems I can’t get Vlad to run a custom command on the
remote server. Here’s a simple task from my config/deploy.rb:

===============================================
namespace :vlad do
task :foo do
run “echo test”
end
end

I’m however unable to run this:

===============================================
$ bundle exec rake vlad:foo --trace
** Invoke vlad:foo (first_time)
** Execute vlad:foo
rake aborted!
private method run' called for nil:NilClass (eval):1:inrun’
<SNIP>/config/deploy.rb:24:in block (2 levels) in <top (required)>' /opt/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:incall’
/opt/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in block in execute' /opt/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:ineach’
/opt/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in execute' /opt/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:158:inblock in
invoke_with_call_chain’
/opt/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in
mon_synchronize' /opt/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:151:ininvoke_with_call_chain’
/opt/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:144:in invoke' /opt/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:116:ininvoke_task’
/opt/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in
block (2 levels) in top_level' /opt/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:ineach’
/opt/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in
block in top_level' /opt/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:instandard_exception_handling’
/opt/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:88:in
top_level' /opt/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:66:inblock in run’
/opt/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:in
standard_exception_handling' /opt/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:63:inrun’
/opt/rubies/ruby-1.9.3-p0/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:32:in
<top (required)>' /opt/rubies/ruby-1.9.3-p0/bin/rake:19:inload’
/opt/rubies/ruby-1.9.3-p0/bin/rake:19:in `’
Tasks: TOP => vlad:foo

I’m using Vlad 2.2.4 with vlad-git 2.2.0. Ruby version is ruby 1.9.3p0
(2011-10-30 revision 33570) [x86_64-linux].

Other Vlad commands, namely vlad:update and vlad:migrate, work just
fine, so I’m sure I’m missing something. Could somebody shed some
light on this?

Valete,
Marvin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJO9MfCAAoJELh1XLHFkqha2jEH/3wdMoVgOHVVhUKVpf1cS4Ci
On6kWkqc8JZjPP6PozT4rw8pXNPdsovI2+T7cIodP+7evPHoiWrlZ5A0gjO7eB9Q
+EsvrG9v8HLTHHjvgDyrp01/6Jmbr4sKnGukkTp5J6jW8U51hIeWnBPxSKASKAFi
ixmONKwY9OpUDVtAn8+BycF5ZFSoIPaIUtpQ0hFw1dR42+doQrk05IkzSYxWOVSw
oMTMXgbvyDDSuWkOQKdgxCb4z8yyREJKHAj0yjZDrDMPkmM5JteA9nCrSKx30tU4
OgZZYVTMzB/QD7WQXxOM0yqELfUA4oKP/vur29mOi432qlpMMFRFV8Q0Da4OEUs=
=YrZ7
-----END PGP SIGNATURE-----

On Dec 23, 2011, at 10:27 , Quintus wrote:

end
run is for remote execution but you’re using a regular task. You want
remote_task.

Please file an issue next time. I don’t always see things in here.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 23.12.2011 22:31, Ryan D. wrote:

On Dec 23, 2011, at 10:27 , Quintus wrote:

namespace :vlad do task :foo do run “echo test” end end

run is for remote execution but you’re using a regular task. You
want remote_task.

Please file an issue next time. I don’t always see things in here.

remote_task works, thank you! :smiley:

And yes, I promise to file an issue next time when I’m trying to
conquer “the heartless spike of Vlad” :wink:

Great tool! Keep up the good work!

Vale,
Marvin

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJO9P1nAAoJELh1XLHFkqha5pMH/3sfUXlGJMV7Ohbe5sDYXI+G
1wsvhm2etBPyLBN/SVgOVUy4JQkDoUkP3z6WKaDJXxrhRLfpDLQ4Jhkl9WfT1mfb
0JkrJv+n/mCU1fUfhkRHY+Dmgoqi1EjNE32joqzlwPz1gnR0XADmylsgVGUjd3jZ
X2gtjKiLuZ4vyQN2geC29HWBCVomeABjY08kYGL0u0NBiAd5Dxa8zn9JYJGHTrDz
P3YR0QlZuhNJmb+3WdJGKrIZ0PyzbbpswD2HgEjzCqoi4pNEQ/aQZ8NstOz4aFmE
koQECz1LS3kSr5dYJc12NaF+6AixseFYs7fVTUKmuISiiF0Pq1CY7nIPgbpk47Q=
=esuS
-----END PGP SIGNATURE-----

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs