我厌倦了这个错误..。我尝试了网络上的一切(到目前为止我发现的)。
创业板
gem 'paperclip', '~> 4.3', '>= 4.3.6'配置/环境/开发.
Paperclip.options[:command_path] = "/c/Program Files/ImageMagick-7.0.1-Q16/"
Paperclip.options[:command_path] = 'C:\Program Files (x86)\GnuWin32\bin'ImageMagick的路径/转换
https://gyazo.com/2e8714546606b796b63f5b64663cab31安装file.exe it
https://gyazo.com/5d0d3d5723c52e6cc812d72202ba4038我的模型
has_attached_file :image, styles: { medium: "300x300>"}
validates_attachment_content_type :image, content_type: /\Aimage\/.*\Z/发布于 2017-08-09 16:27:29
可能有点晚了。这个问题的很多人都在运行Windows。
config/environments/development.rbPaperclip.options[:command\_path] = 'C:\Program Files (x86)\GnuWin32\bin'. You check the path (mine is shown) by running,它在命令行转换`。不是windows附带的命令行。我开吉特巴什。has_attached_file :image, styles: { medium: "300x300>", thumb: "100x100>" }我改到
has_attached_file :image, style: { :medium => "300x300>", :thumb => "100x100>" }
= image_tag @recipe.image.url(:medium), class: "recipe_image"
https://stackoverflow.com/questions/37264425
复制相似问题