【问题标题】:Rails+Paperclip+Imagemagick+Windows 7 => got error 500Rails+Paperclip+Imagemagick+Windows 7 => 出现错误 500
【发布时间】:2013-06-27 01:24:11
【问题描述】:

我已经在 Windows 7 64 位的 RoR 3.2 上安装了回形针和 imagemagick。

我的模型是这样的:

  has_attached_file :sample_file, 
    :styles => { :large => '0x200>' },
    :default_style => :large,
    :url => "/uploads/images/baget/:class/:attachment/:id/:style/:basename.:extension",
    :path => ":rails_root/public/uploads/images/baget/:class/:attachment/:id/:style/:basename.:extension"

当我上传图片时,它会加载一次,当我想加载另一张图片时,我会得到这个:

Errno::EINVAL in BagetsController#create
Invalid argument - ruby_setenv

然后 - 这个:

Internal Server Error
Invalid argument - <STDOUT>
WEBrick/1.3.1 (Ruby/1.9.3/2013-02-22) at localhost:3000

接下来,只有重新启动 WEBRick 会有所帮助,但同样 - 只有一次。

但是!如果将我的模型更改为仅此:

has_attached_file :sample_file

然后我就开始工作了。所以,我认为这可能是 ImageMagick 造成的。或者也许Win7落后了?我不知道。怎么办?

【问题讨论】:

    标签: ruby-on-rails windows imagemagick paperclip


    【解决方案1】:

    解决了。弱点是Win7。换成ubuntu,一切正常

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-03-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多