[sprouts-users] uninitialized constant Net::SFTP::Operations::StatusException

639 views
Skip to first unread message

Stefan Simroth

unread,
May 9, 2010, 10:52:12 AM5/9/10
to ProjectSprouts
Hello,

I am trying to upload a file via the sftp task and I am stuck now with
the following exception.

Any idea? Can't find useful information regarding the problem
somehow...

Thanks,

Stefan


uninitialized constant Net::SFTP::Operations::StatusException
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:443:in `load_missing_constant'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:80:in `const_missing'
C:/Ruby/lib/ruby/gems/1.8/gems/sprout-0.7.241/lib/sprout/tasks/
sftp_task.rb:154:in `put_file'
C:/Ruby/lib/ruby/gems/1.8/gems/sprout-0.7.241/lib/sprout/tasks/
sftp_task.rb:138:in `execute'
C:/Ruby/lib/ruby/gems/1.8/gems/sprout-0.7.241/lib/sprout/tasks/
sftp_task.rb:135:in `each'
C:/Ruby/lib/ruby/gems/1.8/gems/sprout-0.7.241/lib/sprout/tasks/
sftp_task.rb:135:in `execute'
C:/Ruby/lib/ruby/gems/1.8/gems/net-sftp-2.0.4/lib/net/sftp/session.rb:
938:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/net-sftp-2.0.4/lib/net/sftp/session.rb:
938:in `do_version'
C:/Ruby/lib/ruby/gems/1.8/gems/net-sftp-2.0.4/lib/net/sftp/session.rb:
938:in `each'
C:/Ruby/lib/ruby/gems/1.8/gems/net-sftp-2.0.4/lib/net/sftp/session.rb:
938:in `do_version'
C:/Ruby/lib/ruby/gems/1.8/gems/net-sftp-2.0.4/lib/net/sftp/session.rb:
908:in `when_channel_polled'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`to_proc'
C:/Ruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.22/lib/net/ssh/connection/
channel.rb:311:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.22/lib/net/ssh/connection/
channel.rb:311:in `process'
C:/Ruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.22/lib/net/ssh/connection/
session.rb:214:in `preprocess'
C:/Ruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.22/lib/net/ssh/connection/
session.rb:214:in `each'
C:/Ruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.22/lib/net/ssh/connection/
session.rb:214:in `preprocess'
C:/Ruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.22/lib/net/ssh/connection/
session.rb:197:in `process'
C:/Ruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.22/lib/net/ssh/connection/
session.rb:161:in `loop'
C:/Ruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.22/lib/net/ssh/connection/
session.rb:161:in `loop_forever'
C:/Ruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.22/lib/net/ssh/connection/
session.rb:161:in `loop'
C:/Ruby/lib/ruby/gems/1.8/gems/net-sftp-2.0.4/lib/net/sftp/session.rb:
801:in `loop'
C:/Ruby/lib/ruby/gems/1.8/gems/net-sftp-2.0.4/lib/net/sftp/session.rb:
786:in `connect!'
C:/Ruby/lib/ruby/gems/1.8/gems/net-sftp-2.0.4/lib/net/sftp.rb:32:in
`start'
C:/Ruby/lib/ruby/gems/1.8/gems/sprout-0.7.241/lib/sprout/tasks/
sftp_task.rb:128:in `execute'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
`invoke_with_call_chain'
C:/Ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
`invoke_task'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`top_level'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`top_level'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
`top_level'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
C:/Ruby/bin/rake:19:in `load'
C:/Ruby/bin/rake:19

--
You received this message because you are subscribed to the Google Groups "ProjectSprouts" group.
To post to this group, send email to project...@googlegroups.com
To unsubscribe from this group, send email to projectsprout...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/projectsprouts?hl=en

For other info you can visit our project at: http://projectsprouts.org, or on Github at: http://github.com/lukebayes/project-sprouts

Stefan Simroth

unread,
May 9, 2010, 5:53:04 PM5/9/10
to ProjectSprouts

Just to follow up: I still couldn't solve this exact issue, but I
worked around it with plain Ruby. So, it's not urgent for me.

But if anyone else is looking for something similar or has similar
problems, maybe is interested in the workaround. Also I post the
original task code below which did not work.


require 'net/ftp'

desc "Uploads the latest *release* build on our test server"
task :upload do
if File.exist?(myapp_release_swf)
host = "my.host.net"
username = "user"
password = "pwd"
Net::FTP.open(host, username, password) do |ftp|
ftp.chdir("test")
ftp.putbinaryfile(myapp_release_swf)
end
else
puts "There is no release build. You must run 'rake release' first."
end
end


Unfortunately, the following did not succeed, due to the error
mentioned in the first post.


#sftp :upload do |t|
# t.files << myapp_release_swf
# if File.exist?(myapp_release_swf)
# t.host = "my.host.net"
# t.username = "user"
# t.password = "pwd"
# t.remote_path = "."
# else
# puts "There is no release build. You must run 'rake release'
first."
# end
#end


Note that I had to supply a remote_path or otherwise, I got the
following error (which didn't exactly point that out):

>> Connecting to Remote Server: a...@my.host.net:
rake aborted!
undefined method `+' for nil:NilClass
C:/Ruby/lib/ruby/gems/1.8/gems/sprout-0.7.241/lib/sprout/tasks/
sftp_task.rb:194:in `remote_file_name'
C:/Ruby/lib/ruby/gems/1.8/gems/sprout-0.7.241/lib/sprout/tasks/
sftp_task.rb:137:in `execute'
So long...

Stefan


On May 9, 4:52 pm, Stefan Simroth <stefan.simr...@googlemail.com>
wrote:
> For more options, visit this group athttp://groups.google.com/group/projectsprouts?hl=en

Nicolas Gailly

unread,
Sep 11, 2014, 11:50:59 AM9/11/14
to project...@googlegroups.com
Hello,

I don't understand your response.
I'm stuck with the same problem though I am not on Rails, just Ruby.
Could you tell me what you have done please ?

Thank you

Nicolas

Luke Bayes

unread,
Sep 11, 2014, 12:24:05 PM9/11/14
to project...@googlegroups.com
Hey Nicolas,

I hate to do this, but I'm not sure what you're not sure about.

Can you give me some context for this conversation?

Thanks,

Luke


--
--
You received this message because you are subscribed to the Google Groups "ProjectSprouts" group.
To post to this group, send email to project...@googlegroups.com
To unsubscribe from this group, send email to projectsprout...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/projectsprouts?hl=en
 
For other info you can visit our project at: http://projectsprouts.org, or on Github at: http://github.com/lukebayes/project-sprouts
---
You received this message because you are subscribed to the Google Groups "ProjectSprouts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectsprout...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages