Tiago Ameller PRO said almost 4 years ago on Tracking Javascript Errors :
Ok, that was my first insight. I wonder if Rails has already an environment var provided by rails/ujs. Something such window.railsEnvironent(). If not, is easy to set it on the main layout.