我正在使用Paperclip和ActiveAdmin来上传文章中的图片。
但是我遇到了一个问题,当我编辑现有文章时,在Webrcik启动后的第一次编辑时,它运行得非常好。但是系统地,第二次尝试编辑文章时(无论哪个文章),Windows告诉我"file.exe"停止工作,并且浏览器中出现"Internal Server Error Invalid argument - STDOUT"。
因此,我重新启动webrick,上传只能工作一次等等...
这是日志:
但是我遇到了一个问题,当我编辑现有文章时,在Webrcik启动后的第一次编辑时,它运行得非常好。但是系统地,第二次尝试编辑文章时(无论哪个文章),Windows告诉我"file.exe"停止工作,并且浏览器中出现"Internal Server Error Invalid argument - STDOUT"。
因此,我重新启动webrick,上传只能工作一次等等...
这是日志:
Started PUT "/admin/articles/1" for 127.0.0.1 at 2012-10-24 18:11:45 +0200
Processing by Admin::ArticlesController#update as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"VaB3lx3UZaOjUA6Yh+h8jG7ZExSQZDiyZUw6GYJQPbY=", "article"=>{"title"=>"ee", "desc"=>"ee", "content"=>"eeee", "photo"=>#<ActionDispatch::Http::UploadedFile:0x3cce7f0 @original_filename="Desert.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"article[photo]\"; filename=\"Desert.jpg\"\r\nContent-Type: image/jpeg\r\n", @tempfile=#<File:C:/Users/Greg/AppData/Local/Temp/RackMultipart20121024-6620-oorxwu>>}, "commit"=>"Update Article", "id"=>"1"}
[1m[35mAdminUser Load (0.0ms)[0m SELECT `admin_users`.* FROM `admin_users` WHERE `admin_users`.`id` = 2 LIMIT 1
[1m[36mArticle Load (1.0ms)[0m [1mSELECT `articles`.* FROM `articles` WHERE `articles`.`id` = ? LIMIT 1[0m [["id", "1"]]
Command :: identify -format %wx%h "C:/Users/Greg/AppData/Local/Temp/Desert20121024-6620-16n1ehl.jpg[0]"
Command :: identify -format %m "C:/Users/Greg/AppData/Local/Temp/Desert20121024-6620-16n1ehl.jpg[0]"
Command :: identify -format %m "C:/Users/Greg/AppData/Local/Temp/Desert20121024-6620-16n1ehl.jpg[0]"
Command :: convert "C:/Users/Greg/AppData/Local/Temp/Desert20121024-6620-16n1ehl.jpg[0]" -auto-orient -resize "510x" -crop "510x350+0+16" +repage "C:/Users/Greg/AppData/Local/Temp/Desert20121024-6620-16n1ehl20121024-6620-mvfl3a"
Command :: file -b --mime "C:/Users/Greg/AppData/Local/Temp/Desert20121024-6620-16n1ehl20121024-6620-mvfl3a"
[paperclip] Error while determining content type: Command 'file -b --mime :file' returned 255. Expected 0
Command :: identify -format %wx%h "C:/Users/Greg/AppData/Local/Temp/Desert20121024-6620-16n1ehl.jpg[0]"
Command :: identify -format %m "C:/Users/Greg/AppData/Local/Temp/Desert20121024-6620-16n1ehl.jpg[0]"
Completed 500 Internal Server Error in 22073ms
Errno::EINVAL (Invalid argument - ruby_setenv):
我一直在寻找解决方案...但是没有找到一个。
有人知道问题的来源吗?