Skip to content

Instantly share code, notes, and snippets.

@tyabe
Created December 12, 2012 12:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tyabe/4267311 to your computer and use it in GitHub Desktop.
Save tyabe/4267311 to your computer and use it in GitHub Desktop.
Padrino で Better Errors を使う ref: http://qiita.com/items/1512c5c4aab5d51c811a
# …
# 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
#
# ...
$ ruby -v
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin11.4.2]
$ padrino -v
Padrino v. 0.10.7
$ bundle install
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