calvin-brand-light-mode
calvin-brand-dark-mode
∕
⌘K
About Calvin Podcast We Can Do This Book Speaking
aAbout Calvin
Podcast
wWe Can Do This Book
sSpeaking
Back

Show error traces in production in Rails 3.1

Other
Calvin Correli·Nov 30, 2011· 1 minute
I wanted to be able to see error traces in the browser when I'm the one visiting. Here's my hack, dropped into config/initalizers/
if Rails.env == 'production'
  class ActionDispatch::Request
   def local?
     App.developer_ips.include?(remote_ip)
   end
  end
end
App.developer_ips is an array of IP addresses that I typically work from.
Previous Fixing IE gradients with Rails 3.1 and SCSS
Next Louis C.K.: The next Steve Jobs will be a chick

Comments

Write a comment...
00:00 Recording...
calvin-brand-light-mode
calvin-brand-dark-mode
1 Chestnut Hill Plaza #1139
Newark, DE 19713
United States
Copyright © 2026 Calvin Correli
powered by