I'm using the code from here: http://snippets.dzone.com/user/seancribbs
In my controller action I then do this:
file = UrlUpload.new(params[:url])
It works fine on my local machine when testing. When this action runs on the hostingrails server, I get the following error:
Parameters: {"commit"=>"Import", "url"=>"http://www.weddingthailand.com/images/wedding-thailand.jpg", "album_id"=>"561", "action"=>"url_import", "controller"=>"photo_import"}
SocketError (getaddrinfo: Temporary failure in name resolution):
/usr/local/lib/ruby/1.8/net/http.rb:560:in `initialize'
/usr/local/lib/ruby/1.8/net/http.rb:560:in `open'
/usr/local/lib/ruby/1.8/net/http.rb:560:in `connect'
/usr/local/lib/ruby/1.8/timeout.rb:48:in `timeout'
/usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout'
/usr/local/lib/ruby/1.8/net/http.rb:560:in `connect'
/usr/local/lib/ruby/1.8/net/http.rb:553:in `do_start'
/usr/local/lib/ruby/1.8/net/http.rb:542:in `start'
/usr/local/lib/ruby/1.8/open-uri.rb:242:in `open_http'
/usr/local/lib/ruby/1.8/open-uri.rb:626:in `buffer_open'
/usr/local/lib/ruby/1.8/open-uri.rb:164:in `open_loop'
/usr/local/lib/ruby/1.8/open-uri.rb:162:in `catch'
/usr/local/lib/ruby/1.8/open-uri.rb:162:in `open_loop'
/usr/local/lib/ruby/1.8/open-uri.rb:132:in `open_uri'
/usr/local/lib/ruby/1.8/open-uri.rb:528:in `open'
/usr/local/lib/ruby/1.8/open-uri.rb:30:in `open'
/app/controllers/photo_import_controller.rb:24:in `initialize'
/app/controllers/photo_import_controller.rb:62:in `new'
/app/controllers/photo_import_controller.rb:62:in `url_import'
Any ideas?