Log full stacktrace in rails including all gems
ruby, ruby-on-rails, rubygems
Solution
Depending on what version of rails you are using this may help:
http://api.rubyonrails.org/classes/ActiveSupport/BacktraceCleaner.html#method-i-remove_silencers-21
Problem
Currently when I look in the log files of my rails application I get stacktraces like: ``` NoMethodError (undefined method `[]' for nil:NilClass): app/controllers/concerns/example.rb:192:in `rescue in create_example' app/controllers/concerns/example.rb:163:in `create_example' app/controllers/concerns/example.rb:11:in `example' app/controllers/example_controller.rb:39:in `create' ``` The error is triggered from a second project which is included as gem. On line 192 in the example.rb (concern) we use some classes from that included gem and in that class the real exception occurs. Another example: ``` ZeroDivisionError (divided by 0): app/controllers/dummy_controller.rb:15:in `index' ``` And on line 15 ``` test_object.divide_by_zero ``` `test_object` is an instance of a class defined in the included gem I want rails to display and log the full stacktrace including all or specific gems but I can't figure out how to do this. Does someone know how to do this? or someone that can give me a push in the right direction? Thanks!!!