Problem with Net::SFTP

I apologize if this is not the right place to post a message about a gem
like Net::SFTP - if there is a more appropriate forum please let me

When I try to connect to one SFTP server, everything works great. This
is the code:

require “net/sftp”

class TestSftp
Net::SFTP.start("", “”, :password =>
do |sftp|!("", “”)

However when trying to connect to a particular SFTP server, I receive
the following error message:

on_open': open 0014059_PRICE.CSV: failure (4) (RuntimeError) from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:into_proc’
call' from /var/lib/gems/1.8/gems/net-sftp-2.0.2/lib/net/sftp/request.rb:87:inrespond_to’
dispatch_request' from /var/lib/gems/1.8/gems/net-sftp-2.0.2/lib/net/sftp/session.rb:910:inwhen_channel_polled’
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
to_proc' from /var/lib/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/connection/channel.rb:311:incall’
process' ... 26 levels... from /var/lib/gems/1.8/gems/net-sftp-2.0.2/lib/net/sftp/session.rb:801:inloop’
connect!' from /var/lib/gems/1.8/gems/net-sftp-2.0.2/lib/net/sftp.rb:32:instart’
from testSftp.rb:12

Line 307 in download.rb looks like this:

raise “open #{entry.remote}: #{response}” unless response.ok?

However, I really don’t know what’s going on. One thing to note is that
I can sftp fine from the command line to this particular server - I’m
pretty sure it’s not an issue with my login credentials being correct.
I’m wondering if a different protocol is being used and Net::SFTP is
having problems with that. Does anyone have any experience with this?

I did not mean to post this multiple times - I thought I was seeing a
“Preview” screen and backed up to make minor edits and unwittingly

I am very sorry for the extra posts/noise.

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