views:

3715

answers:

1

I just got this error message:

...
from c:/ruby/lib/ruby/gems/1.8/gems/...
 ... 10 levels...
from c:/ruby/lib/ruby/gems/1.8/gems/...
...

and the bug (of course) is hidden somewhere in ... 10 levels....

How to force ruby to show full stack trace?

+8  A: 
begin
  # code that raises exception
rescue Exception => e
  puts e.backtrace
end
Željko Filipin