Created
December 12, 2012 12:12
-
-
Save tyabe/4267311 to your computer and use it in GitHub Desktop.
Padrino で Better Errors を使う ref: http://qiita.com/items/1512c5c4aab5d51c811a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# … | |
# Load our dependencies | |
equire 'rubygems' unless defined?(Gem) | |
require 'bundler/setup' | |
Bundler.require(:default, PADRINO_ENV) | |
# ココを追加 | |
if Padrino.env == :development | |
Padrino::Application.use BetterErrors::Middleware | |
BetterErrors.application_root = PADRINO_ROOT | |
BetterErrors.logger = Padrino.logger | |
# 表示を許可するアクセス元 IPの指定 | |
# thanks! @dayflower | |
# BetterErrors::Middleware.allow_ip! "127.0.0.0/8" # default | |
# BetterErrors::Middleware.allow_ip! "::1/128" # default | |
end | |
## | |
# ## Enable devel logging | |
# | |
# ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ruby -v | |
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin11.4.2] | |
$ padrino -v | |
Padrino v. 0.10.7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ bundle install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group :development do | |
gem "better_errors" | |
gem "binding_of_caller" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment