我正在尝试使用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'
欣赏任何建议