I'm having trouble getting a "solo" Capistrano app (as discussed
in "Deploying Rails Applications") to work.  I'm hoping someone
on this list can give me a hand.

My impression is that the SSH login is failing, because of some
authorization issue, but I've tried setting assorted variables
with no success.  Help?

-r

P.S.  I'd also like to know is there's a way to get the return
      code from a failing command, assuming I get that far...

=== === ===

$ cat t1_s
#!/usr/bin/env ruby
#
# t1_s - sub-command for use by t1.cap

       puts 'Hi on STDOUT'
STDERR.puts 'Hi on STDERR'

=== === ===

$ cat t1.cap
# t1.cap

  set  :application, 'localhost'
  set  :user,        'rdm'
  role :arti,        application

  desc 'Run a test command.'
  task :test_cmd, :roles => :arti do
    begin
      cmd = 'Work/Cap/t1_s'
      run cmd do |channel, stream, data|
        case stream
        when :err
          puts "stderr from #{channel[:host]}: #{data}"
        when :out
          puts "stdout from #{channel[:host]}: #{data}"
        end
      end
    rescue
      puts 'Command failed: ' + $!
    end
  end

=== === ===

$ cap -f ./t1.cap test_cmd
  * executing `test_cmd'
  * executing "Work/Cap/t1_s"
    servers: ["localhost"]
Command failed: connection failed for: localhost
  (NoMethodError: private method `split' called for nil:NilClass)

=== === ===
-- 
http://www.cfcl.com/rdm            Rich Morin
http://www.cfcl.com/rdm/resume     [EMAIL PROTECTED]
http://www.cfcl.com/rdm/weblog     +1 650-873-7841

Technical editing and writing, programming, and web development

--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to