简体   繁体   中英

Rails+Paperclip+Imagemagick+Windows 7 => got error 500

I have installed paperclip and imagemagick on RoR 3.2 on Windows 7 64 bit.

My model looks like that:

  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"

And when I uploading image, it loads once, and when I want to load another image, I get this:

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

And than - this:

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

Next, only restaring WEBRick helps, but again - only one time.

BUT! If change my model to only this:

has_attached_file :sample_file

then I get all working. So, I think that this probably cause from ImageMagick. Or Maybe Win7 is lagging? I dont know. What to do?

Solved. The weak place is Win7. Changed to ubuntu and all work perfect

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM