エラー Errno::ECONNRESET:接続リセットよりピア
-
25-09-2019 - |
質問
gem 'rails', '3.0.0'
gem 'devise'
gem 'bson_ext', '>= 1.0.7'
gem 'bson', '>= 1.0.7'
gem 'mongo_mapper', :branch => 'rails3', :git => 'http://github.com/jnunemaker/mongomapper.git'
gem 'devise-mongo_mapper', :git => 'git://github.com/collectiveidea/devise-mongo_mapper'
上記の設定を取得し、以下のエラーに要求を処理します。
Started GET "/users/sign_out" for 127.0.0.1 at 2010-09-27 13:16:30 +0300
Processing by Devise::SessionsController#destroy as HTML
Redirected to http://localhost:3000/
Completed 302 Found in 19ms
[2010-09-27 13:16:31] ERROR Errno::ECONNRESET: Connection reset by peer
/usr/local/ruby/lib/ruby/1.9.1/webrick/httpserver.rb:56:in `eof?'
/usr/local/ruby/lib/ruby/1.9.1/webrick/httpserver.rb:56:in `run'
/usr/local/ruby/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
Started GET "/users/edit" for 127.0.0.1 at 2010-09-27 13:16:35 +0300
Processing by Devise::RegistrationsController#edit as HTML
Completed in 16ms
[2010-09-27 13:16:35] ERROR Errno::ECONNRESET: Connection reset by peer
/usr/local/ruby/lib/ruby/1.9.1/webrick/httpserver.rb:56:in `eof?'
/usr/local/ruby/lib/ruby/1.9.1/webrick/httpserver.rb:56:in `run'
/usr/local/ruby/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
ユーザモデル
class User
include MongoMapper::Document
plugin MongoMapper::Devise
devise :registerable, :database_authenticatable, :recoverable
end
アイデア、浮かぶのでしょうか。
解決
あなたのセッションやprotect_from_forgeryに問題があるように私の迅速な推測は、このルックスですが中に蹴りされます。
私は同様の問題を抱えていたし、数日間壁に頭を壊し、それは私だけではなく、IDのセッションオブジェクトへのオブジェクト全体を割り当てたことが判明しました。簡単なメモ、非GETリクエストものであることをトリガーprotect_from_forgeryます。
他のヒント
WebRickのものに交換されてい薄いのです。
以下の操作を行って、その試験:
Gemfile:
gem 'thin'
現在い bundle install
私の のdevelopment.rb ののファイルにこれを追加するには、問題を修正します。
config.assets.raise_runtime_errors = true
config.web_console.whitelisted_ips = replace_this_with_the_public_ip
WEBrickにシンに置き換えられています。
次のことを行うと、私のために働いた。
Gemfileます:
gem 'thin'
bundle install
のも、私のプロジェクトに取り組んで、このオプションの
所属していません StackOverflow