---
title: "Paperclip在Windows下的那些Po事"
author: "fireflyman"
date: "2011-04-02T04:22:09Z"
tags: []
categories: ["编程语言"]
slug: "paperclip-windows-po"
draft: false
lastmod: "2011-04-02T08:27:22Z"
id: 983677
url: "https://fireflyman.iteye.com/blog/983677"
---

**<span style="color:blue">1.Paperclip提示command is not recognized by the 'identify</span>**

破->
config\initializers目录下建立一个custom_requires.rb,然后...
例如:G:\Program Files\ImageMagick-6.5.6-Q8
应填入-->(不支持空格)

```Ruby
Paperclip.options[:command_path] = "XX:/PROGRA~1/ImageMagick-6.5.6-Q8" 
```


详细参考-->
Paperclip提示command is not recognized by the 'identify
<http://hot88zh.iteye.com/blog/859238>
<span style="color:blue">
**2.no decode delegate for this image format `C:/DOCUME~1/ROB~1.CML/LOCALS~1/Temp/stream.2692.0'.**</span> 貌似就是Windows上面中文路径无法上传那个事

破->

```Ruby
 has_attached_file :image,
                      
                      :withy => false
```

貌似还有这个,可以看看-->
paperclip 上传文件（解决中文文件无法上传问题）
<http://malijun.iteye.com/blog/800850>
<span style="color:blue">
**3.ie上传提示 content type is not one of image/jpeg, image/png(这应该算是IE的破事吧)**</span>
破->
因为ie image MIME 和ff不同,修改model中验证为-->

```Ruby
validates_attachment_content_type :photo, :content_type => ['image/jpeg','image/png','image/pjpeg','image/x-png']
```



不知道还有没有其它了,反正记下三个用着先,有的可以补上,特别yuanyuan