【发布时间】:2011-09-01 02:11:11
【问题描述】:
尝试在混合服务器上的 Windows 上运行回形针。图片不会上传,生成控制台日志
Invalid Parameter - /Users
[paperclip] An error was received while processing: #<Paperclip::PaperclipError: There was an error processing the thumbnail for stream20110831-1316-1naludd>
型号代码是
has_attached_file :image, :styles => { :large => "1280x800", :thumb => "128x80" }
表格代码是
<%= simple_form_for @item, :html => { :multipart => true } do |f| %>
<%= f.error_messages %>
<%= f.input :name %>
<%= f.input :price %>
<%= f.input :description %>
<%= f.input :image %>
<%= f.association :section, :include_blank => false %>
<%= f.submit %>
<% end %>
Imagemagick 已安装,路径放在 development.rb 文件中。从多个位置尝试了多种图像格式(.jpg、.png、.gif)。迁移已完成。有什么想法吗?
编辑:已解决。原来我犯了一个超级愚蠢的错误,并在 imageMagick 的路径中添加了斜杠,忘记了第二个窗口使用反斜杠。
【问题讨论】:
-
你能改变回形针或其他地方的临时路径吗?你遇到的问题是我认为路径中的 \ ,无论它现在如何反转它,如果可能的话 / 或 Windows 认为它是一个开关。
标签: ruby-on-rails ruby ruby-on-rails-3 imagemagick paperclip