PigRider Blogs

Sign In
HTML CSS Javascript Ruby on Rails C++ Java Python SQL Git Linux Others All

Solution: gem Paperclip "file -b --mime-type" doesn't work well in Windows.

[Author: Dingyu]   [Fri, 2014-08-22, 23:17]   [2901 views]

Ruby on Rails

Gem Paperclip "file -b --mime-type" doesn't work well in Windows.


Error messages:
[paperclip] Error while determining content type: No such file or directory - file -b --mime ...

[paperclip] Content Type Spoof: ... (["image/jpeg"]), content type discovered from file command: . See documentation to allow this combination.


Solution:
1. Install "File for Windows"
2. Add "File for Windows" bin directory to Windows system PATH