Hi Rich,
This looks the error I got when I first moved to Capistrano 2.3 from
2.1 (in particular when I moved from Net::SSH 1.1.2 to 2.0.1). This
had me tearing my hair out for a while because it was working on our
production servers but not for the test setup on my local machine,
but a quick use of rdebug and I found that Net::SSH was now reading
ssh configuration files and my personal configuration (~/.ssh/config)
wasn't in a format that it was expecting.
I had something like:
Host=localhost
User=username
while Net::SSH 2.0.1 was expecting a space separated layout:
Host localhost
User username
Hope this helps,
Henry
On 28 May 2008, at 07:03, Rich Morin wrote:
>
> 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
>
> >
------------------------------------------------------------------------
------
Henry Addison
Software Engineer
Texperts
Mobile +44 (0) 7986 839321
Main : +44 (0) 1223 309080 Fax: +44(0) 1223 309082
[EMAIL PROTECTED]
------------------------------------------------------------------------
------
Re5ult Limited Registered in England No 04909795 VAT registration
number GB 849 201 231. Registered office 74 Eden Street Cambridge CB1
1EL.
This email is confidential. It may be read, copied and used only by
the intended recipient. If you have received it in error, please
contact us immediately.
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---