paperclip image broken in rails 3.1rc4

你。 提交于 2019-12-11 07:44:24

问题


I am using rails 3.1rc4 with paperclip and i cannot upload any image file with. I keep getting this error
Image D:/Users/MOBILE/AppData/Local/Temp/stream20110612-3872-y7hmme-0.jpg is not recognized by the 'identify' command. I have imagemagic installed. But it works in <= rails 3.0.8rc4.


回答1:


I am not sure if this will adress your specific issue but I found this and maybe its related:

https://github.com/thoughtbot/paperclip/issues/481

It states: The paperclip:refresh:metadata rake task fails with Rails 3.1 as ActiveRecord no longer supports instance.save(false) - you must now use instance.save(:validate => false) instead.




回答2:


I'm on Mac and I had the exact same problem after I updated to Mac OS Lion, in order to fix this error I had to reinstall imagemagick

This might help other Mac OS Lion users:

First make sure to download the latest XCode from the app store (4.1 atm I believe, it's free)

Using Homebrew:

brew uninstall imagemagick
brew update

if you get any errors, clean up files ending in .a or .la with "brew doctor", then just do

brew install imagemagick

If you are using MacPorts do:

port uninstall imagemagick
port selfupdate
port install imagemagick


来源:https://stackoverflow.com/questions/6321485/paperclip-image-broken-in-rails-3-1rc4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!