2010/08/07

simple_captcha + Windows で no encode delegate for this image format error

Rails 3 用の simple_captcha plugin にアップグレードしたら動かなくなりました。 ログを見ると
StandardError (Error while running convert: convert: no encode delegate for this image format `'C:/Users/Me/AppData/Local/Temp/simple_captcha,4020,0.jpg'' @constitute.c/WriteImage/1114.
Paperclip を Windows で動かそうとしたときのエラーと同じように、シングルクオートが問題なのか?
実際、問題の convert コマンドの ' を " に変えてマニュアル実行したら動きました。

ならば。。。
vendor/plugins/simple_captcha/lib/simple_captcha/image.rb (line 72)
# params << "label:#{text} '#{File.expand_path(dst.path)}'"
params << "label:#{text} \"#{File.expand_path(dst.path)}\""
vendor/plugins/simple_captcha/lib/simple_captcha/image.rb (line 64)
# params << "-gravity 'Center'"
params << "-gravity \"Center\""
で解決

0 件のコメント: