samuel_x_winters_x / hotmail.com wrote:
> The net/ssh code below works fine in irb, but dies when inside a rake
> task.
> 
> task :publish do
>   require 'net/ssh'
>   Net::SSH.start('svr.com','usr','pwd') do |session|
>     shell = session.shell.sync
>     out = shell.pwd
>     puts out.stdout
>   end
> end

How does this work in irb? What does "out.stdout" do?

Maybe you meant "$stdout.puts out" ?