Paperclip my Image is not recognized by the 'identify' command. (Running Windows)
Im using Paperclip to size my images but I keep getting this error
( 1 error prohibited this project from being saved: Image C:/DOCUME~1/HP_ADM~1/LOCALS~1/Temp/stream,5584,0.jpg is not recognized by the 'identify' command. )
Ive tried pretty much everything that I found online:
- Adding Paperclip.options[:command_path] = "C:\ImageMagick-6.6.6-Q16" to my development.rb
- Doing changes to the p开发者_开发百科roject.rb (removing single quotes)
I'm running windows with the latest Ruby/Rails and Paperclip 1.3.3
Im just getting into Rails and I have no idea what to do. I know this is a common problem but all of the answers I have come across havent helped.
Thanks in advance.
I was able to get this to work on Windows XP (my dev environment - deployment to Heroku worked fine) by doing the following:
- Installing ImageMagick to c:\ImageMagick
editing config/environments/development.rb and adding the following
Paperclip.options[:command_path] = "C:/ImageM~1"
Kill and restart the dev server to pick up the new config.
I was not able to get it to work by using "long" windows paths. Only the '~1' monstrosity. So, the only thing you might have to do is change
Paperclip.options[:command_path] = "C:\ImageMagick-6.6.6-Q16"
to
Paperclip.options[:command_path] = "C:/ImageM~1"
I was able to get it working more or less in the same way as Edward, with some additions:
- Installing ImageMagick to c:\Imagick6 -> chose this path to have a folder name of not more than 8 chars
- If you have a previous version, make sure that you remove that old version from the path and that c:\Imagick6 is in your Windows path (check with "echo %path%" on prompt)
- edit config/environments/development.rb and add:
Paperclip.options[:command_path] = "C:/Imagick6" - Kill and restart the dev server to pick up the new config
- You might even need to restart Windows to make sure the new path is picked up (I did, could not verify whether that helped)
精彩评论