I've being able to resolve it using the following code:
uri = URI.parse('sftp://' + host)
Net::SFTP.start(uri.host,username,:password=>password,:port=>port) do |sftp|
sftp.upload(testupload.zip,"./#{uri.path}/testupload.zip")
end
Always assuming that the path after the server name is a relative path from logged on user's home directory.