Ruby 1.8.7 から 1.9.3 に移行しているときに、ペーパークリップの写真のアップロードで 1 つの問題に直面しています。
s3 をストアとして、Paperclip を構成しました。1.8.7を使用してRailsサーバーを実行すると正常に動作しますが、1.9.3では(エラーなしで)ファイルをアップロードしません。
構成とログを見てください。
ペーパークリップ構成:
has_attached_file :pic,
:styles => {
:thumb => "100x100#",
:one => "118x100#",
:two => "222x149#",
:three => "460x345#",
:popup => "480x360#"
},
:storage => :s3,
:s3_credentials => Settings.amazon_s3.to_hash,
:path => ":attachment/:id/:style/:filename",
:bucket => Settings.amazon_s3.my_bucket
画像アップロード時のログ
[paperclip] Duplicate URL for photo with /system/:attachment/:id/:style/:filename. This will clash with attachment defined in Photo class
[paperclip] Duplicate URL for photo with /system/:attachment/:id/:style/:filename. This will clash with attachment defined in User class
Command :: identify -format %wx%h '/tmp/stream20120414-20761-hnqjzj.jpg[0]'
Command :: convert '/tmp/stream20120414-20761-hnqjzj.jpg[0]' -resize "x100" -crop "100x100+30+0" +repage '/tmp/stream20120414-20761-hnqjzj20120414-20761-1e0nflx'
Command :: identify -format %wx%h '/tmp/stream20120414-20761-hnqjzj.jpg[0]'
Command :: convert '/tmp/stream20120414-20761-hnqjzj.jpg[0]' -resize "x100" -crop "118x100+21+0" +repage '/tmp/stream20120414-20761-hnqjzj20120414-20761-h7a0ri'
Command :: identify -format %wx%h '/tmp/stream20120414-20761-hnqjzj.jpg[0]'
Command :: convert '/tmp/stream20120414-20761-hnqjzj.jpg[0]' -resize "x149" -crop "222x149+8+0" +repage '/tmp/stream20120414-20761-hnqjzj20120414-20761-10av65c'
Command :: identify -format %wx%h '/tmp/stream20120414-20761-hnqjzj.jpg[0]'
Command :: convert '/tmp/stream20120414-20761-hnqjzj.jpg[0]' -resize "x345" -crop "460x345+46+0" +repage '/tmp/stream20120414-20761-hnqjzj20120414-20761-13ixq6o'
Command :: identify -format %wx%h '/tmp/stream20120414-20761-hnqjzj.jpg[0]'
Command :: convert '/tmp/stream20120414-20761-hnqjzj.jpg[0]' -resize "x360" -crop "480x360+48+0" +repage '/tmp/stream20120414-20761-hnqjzj20120414-20761-g6turu'
これについてあなたのアイデアを共有してください。私はRubyが初めてです。私はいくつかの設定を逃したのですか?すでに 1.8.7 で動作しているため、そうではありません。
アップデート:
Paperclip 2.7.0、Rails 3.0.11、Ruby 1.9.3 を使用