Nat*_*ert 11 ruby-on-rails paperclip
我有一个使用Paperclip的rails安装工作正常一段时间,并且在最近的部署中它已经坏了.我相信它与gemfile更新同时发生,因为机器上的其他内容都没有改变.错误是:
Command :: file -b --mime :file
[paperclip] Error while determining content type: Command 'file -b --mime :file' returned 1. Expected 0
Run Code Online (Sandbox Code Playgroud)
这是我已经验证有效的png文件.当我在图像上运行'file -b --mime'时,我得到:
image/png; charset=binary
Run Code Online (Sandbox Code Playgroud)
之后我也得到了这个:
Command :: identify -format %wx%h :file
[paperclip] An error was received while processing: #<Paperclip::Errors::NotIdentifiedByImageMagickError: /tmp/song_waveform_3010520121008-23335-165xag4.png20121008-23335-j8e18p is not recognized by the 'identify' command.>
Run Code Online (Sandbox Code Playgroud)
我做了一个文件,它给了我/ usr/bin所以我尝试在production.rb中设置Paperclip.options [:command_path] ="/ usr/bin /"而没有任何变化.
我想不出为什么会发生这种情况.也许它没有指向正确的目录?我在这里有点失落.
Max*_*unn 21
很可能这是由可卡因4的API变化造成的,而Paperclip还没有赶上.通过将此行插入Gemfile,尝试使用早期版本的Cocaine:
gem "cocaine", "= 0.3.2"
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
12411 次 |
最近记录: |