今天在进行项目开发时,需要对二维码进行添加标示符的处理:但在执行下面代码后出现了:Errno::ENOENT: No such file or directory 错误(注意我是对远程图片路径进行请求) #为二维码生成标示符
def make_qr_flag(image_url,content)
image = MiniMagick::Image.open(image_url)
image.combine_options do |c|
c.gravity 'South'
c.pointsize '20'
c.draw "text 3,3 '#{content}'"
c.fill 'green'
end
image.write(image_url)
image_url
end