# Abbreviated stack when using runner

**URL:** <https://www.ruby-forum.com/t/abbreviated-stack-when-using-runner/169681>\
**Category:** Rails\
**Created:** [June 6, 2009, 10:42pm UTC](https://www.ruby-forum.com/t/abbreviated-stack-when-using-runner/169681 "2009-06-06T22:42:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pedz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/839c29/32.png) [@pedz](https://www.ruby-forum.com/u/pedz)\
**Post date:** [June 6, 2009, 10:42pm UTC](https://www.ruby-forum.com/t/abbreviated-stack-when-using-runner/169681/1 "2009-06-06T22:42:56Z")

</div>

When I use script/runner and get an exception, the stack that is printed  
often has something like:

```
    from

```

/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active\_record/transactions.rb:200:in  
`save!’  
… 9 levels…  
from  
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/runner.rb:46

Is there any way I can get a full stack?

Thanks,  
Perry

---

<div class="post-metadata">

**Author:** ![pedz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/839c29/32.png) [@pedz](https://www.ruby-forum.com/u/pedz)\
**Post date:** [June 7, 2009, 1:07am UTC](https://www.ruby-forum.com/t/abbreviated-stack-when-using-runner/169681/2 "2009-06-07T01:07:53Z")

</div>

MaurÃ­cio Linhares wrote:

> Look for the file config/initializers/backtrace\_sileners.rb
> 
> And leave it just like this:
> 
> # Be sure to restart your server when you modify this file.
> 
> # You can add backtrace silencers for libraries that you’re using but
> 
> don’t wish to see in your backtraces.
> 
> # Rails.backtrace\_cleaner.add\_silencer { |line| line =~
> 
> /my\_noisy\_library/ }
> 
> # You can also remove all the silencers if you’re trying do debug a
> 
> problem that might steem from framework code.  
> Rails.backtrace\_cleaner.remove\_silencers!
> 
> You’ll get all backtraces again.

That didn’t seem to affect scripts/runner

For now, I kludged it by doing:

begin  
  
rescue =\> e  
puts e.backtrace  
exit 1  
end

I hope there is a better solution.

Thanks again,  
Perry

---

<div class="post-metadata">

**Author:** ![pedz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/839c29/32.png) [@pedz](https://www.ruby-forum.com/u/pedz)\
**Post date:** [June 7, 2009, 12:53am UTC](https://www.ruby-forum.com/t/abbreviated-stack-when-using-runner/169681/3 "2009-06-07T00:53:07Z")

</div>

Look for the file config/initializers/backtrace\_sileners.rb

And leave it just like this:

# Be sure to restart your server when you modify this file.

# You can add backtrace silencers for libraries that you’re using but

don’t wish to see in your backtraces.

# Rails.backtrace\_cleaner.add\_silencer { |line| line =~

/my\_noisy\_library/ }

# You can also remove all the silencers if you’re trying do debug a

problem that might steem from framework code.  
Rails.backtrace\_cleaner.remove\_silencers!

You’ll get all backtraces again.

- 

Maurício Linhares  
[http://alinhavado.wordpress.com/](http://alinhavado.wordpress.com/) (pt-br) |  
[http://codeshooter.wordpress.com/](http://codeshooter.wordpress.com/) (en)

On Sat, Jun 6, 2009 at 5:42 PM, Perry
