How can I save a image with an image url in ruby?

I would like to have a copy of an image file locally given an image url.
like this
def loadimage=(image_url)
…how to fetch image from an url…"#{RAILS_ROOT}/public/images/#{file.original_filename}",
“w+”) do |f|

Anyone could refer any existing helper with the function I need?


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