Re: REXML::UndefinedNamespaceException when downloading from Amazon S3

2013-02-20 Thread Martin Gogov


On Saturday, March 24, 2012 3:43:15 AM UTC+1, Danorak wrote:

 I am downloading a file from Amazon S3 into the tmp directory of my 
 heroku dyno.  I am using aws-s3 and downloading using the following 
 code: 

 def s3_get_file(filename, bucket_name) 
 logger.debug S3 - Streaming #{filename} from bucket 
 #{bucket_name} to temp 
 temp = Tempfile.new(s3) 

 File.open(temp.path, 'wb') do |file| 
   AWS::S3::S3Object.stream(filename, bucket_name) { |segment| 
 file  segment 
   } 
 end 

 temp.path 
 end 

 This works fine on my local machine but when running on heroku I get 
 the following exception. 

 2012-03-24T02:18:12+00:00 app[web.1]: 
 REXML::UndefinedNamespaceException (Undefined prefix Net: found): 
 2012-03-24T02:18:12+00:00 app[web.1]:   app/controllers/ 
 application_controller.rb:73:in `block in s3_get_file' 
 2012-03-24T02:18:12+00:00 app[web.1]:   app/controllers/ 
 application_controller.rb:72:in `open' 
 2012-03-24T02:18:12+00:00 app[web.1]:   app/controllers/ 
 application_controller.rb:72:in `s3_get_file' 

 Line 73 is the S3Object.stream call. 

 Any ideas what is going on here. 

 Thanks

-- 
-- 
You received this message because you are subscribed to the Google
Groups Heroku group.

To unsubscribe from this group, send email to
heroku+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
Heroku Community group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: REXML::UndefinedNamespaceException when downloading from Amazon S3

2012-08-28 Thread David Westerink
Danorak,

Have you solved this issue? I'm running in this exact error myself on a 
Amazon EC2 instance... And I was wondering if you ever happened to solve 
this issue...

Op zaterdag 24 maart 2012 03:43:15 UTC+1 schreef Danorak het volgende:

 I am downloading a file from Amazon S3 into the tmp directory of my 
 heroku dyno.  I am using aws-s3 and downloading using the following 
 code: 

 def s3_get_file(filename, bucket_name) 
 logger.debug S3 - Streaming #{filename} from bucket 
 #{bucket_name} to temp 
 temp = Tempfile.new(s3) 

 File.open(temp.path, 'wb') do |file| 
   AWS::S3::S3Object.stream(filename, bucket_name) { |segment| 
 file  segment 
   } 
 end 

 temp.path 
 end 

 This works fine on my local machine but when running on heroku I get 
 the following exception. 

 2012-03-24T02:18:12+00:00 app[web.1]: 
 REXML::UndefinedNamespaceException (Undefined prefix Net: found): 
 2012-03-24T02:18:12+00:00 app[web.1]:   app/controllers/ 
 application_controller.rb:73:in `block in s3_get_file' 
 2012-03-24T02:18:12+00:00 app[web.1]:   app/controllers/ 
 application_controller.rb:72:in `open' 
 2012-03-24T02:18:12+00:00 app[web.1]:   app/controllers/ 
 application_controller.rb:72:in `s3_get_file' 

 Line 73 is the S3Object.stream call. 

 Any ideas what is going on here. 

 Thanks

-- 
You received this message because you are subscribed to the Google
Groups Heroku group.

To unsubscribe from this group, send email to
heroku+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en_US?hl=en


REXML::UndefinedNamespaceException when downloading from Amazon S3

2012-03-26 Thread Danorak
I am downloading a file from Amazon S3 into the tmp directory of my
heroku dyno.  I am using aws-s3 and downloading using the following
code:

def s3_get_file(filename, bucket_name)
logger.debug S3 - Streaming #{filename} from bucket
#{bucket_name} to temp
temp = Tempfile.new(s3)

File.open(temp.path, 'wb') do |file|
  AWS::S3::S3Object.stream(filename, bucket_name) { |segment|
file  segment
  }
end

temp.path
end

This works fine on my local machine but when running on heroku I get
the following exception.

2012-03-24T02:18:12+00:00 app[web.1]:
REXML::UndefinedNamespaceException (Undefined prefix Net: found):
2012-03-24T02:18:12+00:00 app[web.1]:   app/controllers/
application_controller.rb:73:in `block in s3_get_file'
2012-03-24T02:18:12+00:00 app[web.1]:   app/controllers/
application_controller.rb:72:in `open'
2012-03-24T02:18:12+00:00 app[web.1]:   app/controllers/
application_controller.rb:72:in `s3_get_file'

Line 73 is the S3Object.stream call.

Any ideas what is going on here.

Thanks

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