0

ペーパークリップ、aws-sdk gems を含むレールでブログ アプリを作成しました。Heroku にデプロイされた私のアプリでは、投稿の作成または更新中にErrno::ECONNREFUSEDエラーが発生し、投稿が作成または更新されませんでした。

一方、S3、ペーパークリップ、データベースなど、必要なものはすべて設定しました。フォーム経由でアップロードされた写真は処理されているようですが、AWS S3 バケット ページでは見ることができますが、アプリでは見ることができません。アプリ内の検索機能やメール機能とは一切関係ありませんのでご注意ください。Heroku での私のアプリからの完全なトレースは次のとおりです。

posts_controller.rb:

def create
  @post = current_user.posts.new(post_params)

  respond_to do |format|
    if @post.save
      format.html { redirect_to @post, notice: 'Post was successfully created.' }
      format.json { render action: 'show', status: :created, location: @post }
    else
      format.html { render action: 'new' }
      format.json { render json: @post.errors, status: :unprocessable_entity }
    end
  end
end

エラー出力:

Oct 12 10:56:28 :  Started POST "/posts" for 5.47.88.217 at 2013-10-12 17:56:28 +0000 
Oct 12 10:56:28 :  Started POST "/posts" for 5.47.88.217 at 2013-10-12 17:56:28 +0000 
Oct 12 10:56:28 :  Processing by PostsController#create as HTML 
Oct 12 10:56:28 :  Processing by PostsController#create as HTML 
Oct 12 10:56:28 :    Parameters: {"utf8"=>"✓", "authenticity_token"=>"VoJae1/rRl+qCKOqAtl341AQFVsXjaB9gDCpfQJeHDI=", "post"=>{"title"=>"Perferendis, repellendus, fugit ea exercitationem", "category"=>"temporibus", "content"=>"Lorem ipsum dolor sit amet, consectetur adipisicing elit. Velit, voluptatibus, eum, saepe quis quos dolor veritatis quod voluptatem alias voluptatum reprehenderit sequi eos. Quasi, et cupiditate ad. Ipsum, nulla inventore voluptatem maiores incidunt illo nam quae illum vero ratione sit quod provident commodi nesciunt asperiores quaerat laboriosam culpa amet dolores recusandae. Illo, molestias, excepturi, eligendi fugiat expedita quo cumque sequi quia inventore ratione autem exercitationem atque! Aspernatur, modi, nostrum, quod aut ex nesciunt esse cum doloribus ea porro nulla minima inventore explicabo perspiciatis accusantium eum officia expedita laborum repudiandae provident libero quibusdam dicta sunt nemo at reiciendis reprehenderit nisi nobis veniam dignissimos ipsa voluptatem commodi ad qui saepe  
Oct 12 10:56:28 :  assumenda enim! Numquam, mollitia, dolorum cumque minima quibusdam accusantium velit odio nam corporis inventore necessitatibus nulla quidem et officiis excepturi repellat quas itaque quasi ducimus dolorem ad debitis illum non doloremque dolor deleniti soluta dignissimos dicta pariatur laborum! Mollitia, voluptatibus, at, veniam similique assumenda vitae quidem modi illo magnam nisi accusamus quaerat illum molestias. Recusandae, blanditiis, accusamus, praesentium atque sequi eligendi in aliquam natus iusto dolore sint ex quasi voluptas ab aperiam? Ipsam, perspiciatis cupiditate iste vitae repellat delectus voluptate. Modi, architecto, expedita, ipsa soluta sapiente quisquam maiores praesentium rerum dolorem recusandae nobis perspiciatis. Minima, deleniti doloribus sunt quod ut ipsum facere nihil neque vero quibusdam cum officia iure aperiam ducimus animi suscipit nobis dignissimos praesentium rerum commodi ullam dolores placeat possimus nemo deserunt! Voluptatem, cumque, recusandae, suscipit, accusamus reici 
Oct 12 10:56:28 :  Command :: identify -format %m '/tmp/ash20131012-2-lu2gkh.png[0]' 
Oct 12 10:56:28 :  Command :: identify -format %m '/tmp/ash20131012-2-lu2gkh.png[0]' 
Oct 12 10:56:28 :  Command :: identify -format %m '/tmp/ash20131012-2-lu2gkh.png[0]' 
Oct 12 10:56:28 :  Command :: identify -format %m '/tmp/ash20131012-2-lu2gkh.png[0]' 
Oct 12 10:56:28 :  Command :: identify -format %m '/tmp/ash20131012-2-lu2gkh.png[0]' 
Oct 12 10:56:28 :  Command :: identify -format %m '/tmp/ash20131012-2-lu2gkh.png[0]' 
Oct 12 10:56:28 :  Command :: convert '/tmp/ash20131012-2-lu2gkh.png[0]' -auto-orient -resize "100x100>" '/tmp/ash20131012-2-lu2gkh20131012-2-1y9sk7o' 
Oct 12 10:56:28 :  Command :: convert '/tmp/ash20131012-2-lu2gkh.png[0]' -auto-orient -resize "100x100>" '/tmp/ash20131012-2-lu2gkh20131012-2-1y9sk7o' 
Oct 12 10:56:28 :  Command :: file -b --mime '/tmp/ash20131012-2-lu2gkh20131012-2-1y9sk7o' 
Oct 12 10:56:29 :  Command :: identify -format %m '/tmp/ash20131012-2-lu2gkh.png[0]' 
Oct 12 10:56:29 :  Command :: identify -format %m '/tmp/ash20131012-2-lu2gkh.png[0]' 
Oct 12 10:56:29 :  Command :: identify -format %m '/tmp/ash20131012-2-lu2gkh.png[0]' 
Oct 12 10:56:29 :  Command :: identify -format %m '/tmp/ash20131012-2-lu2gkh.png[0]' 
Oct 12 10:56:29 :  Command :: convert '/tmp/ash20131012-2-lu2gkh.png[0]' -auto-orient -resize "220x165>" '/tmp/ash20131012-2-lu2gkh20131012-2-2tbb6d' 
Oct 12 10:56:29 :  Command :: convert '/tmp/ash20131012-2-lu2gkh.png[0]' -auto-orient -resize "220x165>" '/tmp/ash20131012-2-lu2gkh20131012-2-2tbb6d' 
Oct 12 10:56:29 :  Command :: file -b --mime '/tmp/ash20131012-2-lu2gkh20131012-2-2tbb6d' 
Oct 12 10:56:29 :  Command :: file -b --mime '/tmp/ash20131012-2-lu2gkh20131012-2-2tbb6d' 
Oct 12 10:56:29 :  [paperclip] saving /posts/captions/000/000/001/original/ash.png 
Oct 12 10:56:29 :  [paperclip] saving /posts/captions/000/000/001/original/ash.png 
Oct 12 10:56:29 :  Completed 500 Internal Server Error in 1242ms 
Oct 12 10:56:29 :  Completed 500 Internal Server Error in 1242ms 
Oct 12 10:56:29 :  Errno::ECONNREFUSED (Connection refused - connect(2)): 
Oct 12 10:56:29 :    app/controllers/posts_controller.rb:31:in `block in create' 
Oct 12 10:56:29 :    app/controllers/posts_controller.rb:30:in `create' 
Oct 12 10:56:29 :  Errno::ECONNREFUSED (Connection refused - connect(2)): 
Oct 12 10:56:29 :    app/controllers/posts_controller.rb:31:in `block in create' 
Oct 12 10:56:29 :    app/controllers/posts_controller.rb:30:in `create' 
Oct 12 10:56:42 :  Started GET "/posts" for 5.47.88.217 at 2013-10-12 17:56:42 +0000 
Oct 12 10:56:42 :  Started GET "/posts" for 5.47.88.217 at 2013-10-12 17:56:42 +0000 
Oct 12 10:56:42 :  Processing by PostsController#index as HTML 
Oct 12 10:56:42 :  Processing by PostsController#index as HTML 
Oct 12 10:56:42 :    Rendered posts/index.html.erb within layouts/application (34.8ms) 
Oct 12 10:56:42 :    Rendered posts/index.html.erb within layouts/application (34.8ms) 
Oct 12 10:56:42 :  Completed 200 OK in 51ms (Views: 14.5ms | ActiveRecord: 33.0ms) 
Oct 12 10:56:42 :  Completed 200 OK in 51ms (Views: 14.5ms | ActiveRecord: 33.0ms)
4

0 に答える 0