You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Content-Length: 234567 | pFad | http://b.hatena.ne.jp/machupicchubeta/rack/
背景 exceptions_appの仕組みで例外を捕捉しようとしているとき(*)、その処理は Rack Middleware のActionDispatch::ShowExceptionsで行われます。本番環境 (RAILS_ENV = production) ではここで例外が捕捉されることによりエラーページが表示されます。 一方でテスト環境 (RAILS_ENV = test) では、デフォルトの設定のままではこれが無効になっており、エラーページは表示されません。 例外が発生することをテストすることができるため通常はこの動作は望ましいのですが、Requests Spec や Features Spec などで、エラー発生時の表示やステータスコードをテストしたい時があります。 そういう時のために、一時的にActionDispatch::ShowExceptionsでの例外捕捉を有効にし、エ
Speed & Concurrency Current Release: 6.5.0 Unlike other Ruby Webservers, Puma was built for speed and parallelism. Puma is a small library that provides a very fast and concurrent HTTP 1.1 server for Ruby web applications. It is designed for running Rack apps only. What makes Puma so fast is the careful use of a Ragel extension to provide fast, accurate HTTP 1.1 protocol parsing. This makes the se
Railsはエラーページをもともと用意してくれていて本番で動かすと そこに飛ばしてくれるので、まぁいいっちゃいいのですが、 簡単に設定できるのでやってしまえばいいかと。 (レイアウトとかそのまま使えてサイト内ページっぽくなるし) ■環境 Rails 4.0.3 Ruby 2.1.1 とりあえずローカルで見たいのでWEBric(rails s)を本番設定で起動して確認します。 (developmentのままだといつもの赤いページが表示されます) まず、ActionController::RoutingErrorを拾うためにroutesに設定が必要です。 class ApplicationController < ActionController::Base protect_from_forgery with: :exception rescue_from ActiveRecord::Reco
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く
Fetched URL: http://b.hatena.ne.jp/machupicchubeta/rack/
Alternative Proxies: