我在新计算机上设置了Rails,并从github分叉了我的存储库。这个存储库在我的桌面计算机上运行得非常好。
但是现在为我的用户模型上传个人资料图片时出现此错误
Command :: file -b --mime "C:/Users/Maxence/AppData/Local/Temp/8ab130f329c41e18078e316bdd9fc5ae20170705-7476-1788hla.jpg"
[paperclip] Content Type Spoof: Filename 24112014-DSC00522.jpg (image/jpeg from Headers, ["image/jpeg"] from Extension), content type discovered from file command: . See documentation to allow this combination.
(0.0ms) BEGIN
Command :: file -b --mime "C:/Users/Maxence/AppData/Local/Temp/8ab130f329c41e18078e316bdd9fc5ae20170705-7476-g6nde9.jpg"
[paperclip] Content Type Spoof: Filename 24112014-DSC00522.jpg (image/jpeg from Headers, ["image/jpeg"] from Extension), content type discovered from file command: . See documentation to allow this combination.
(0.0ms) ROLLBACK
我不确定问题来自哪里
唯一的事情是,当我在新安装上运行which convert
时,我从命令中得到C:\Windows\system32\convert.EXE
作为答案,而我在台式计算机上出现错误,而且Paperclip工作正常......
添加Paperclip.options[:command_path] = 'C:\Windows\system32\'
会产生新错误