MiniMagick无法查看现有的图像文件

时间:2015-01-13 10:18:16

标签: ruby-on-rails ruby ruby-on-rails-4 minimagick

我正在尝试使用MiniMagick和Rails打开图像,但无论我怎么做,MM都看不到任何图像。我花了几个小时试图弄清楚这个,但它超出了我。

rails console

p = Provider.last
p.image_url
=> "/uploads/service_provider/image/35/Logo.jpg"

img = MiniMagick::Image.open(p.image_url.to_s)
Errno::ENOENT: No such file or directory @ rb_sysopen - /uploads/service_provider/image/35/Logo.jpg
from /Users/user/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/open-uri.rb:36:in `initialize'

i = MiniMagick::Image.open(p.image_url)
Errno::ENOENT: No such file or directory @ rb_sysopen - /uploads/service_provider/image/35/Logo.jpg
from /Users/user/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/open-uri.rb:36:in `initialize'

欣赏任何建议

0 个答案:

没有答案