# Shear my yak? (deeper debugging)

**URL:** <https://www.ruby-forum.com/t/shear-my-yak-deeper-debugging/142453>\
**Category:** Rails\
**Created:** [July 8, 2008, 4:28am UTC](https://www.ruby-forum.com/t/shear-my-yak-deeper-debugging/142453 "2008-07-08T04:28:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tshim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c4cdca/32.png) [@tshim](https://www.ruby-forum.com/u/tshim)\
**Post date:** [July 8, 2008, 4:28am UTC](https://www.ruby-forum.com/t/shear-my-yak-deeper-debugging/142453/1 "2008-07-08T04:28:58Z")

</div>

Word up and thanks to those that continue to contribute positively to  
the group.

I am about to lop off my left nut to get to the bottom of a strange  
behavior I’m witnessing.

Rails somehow can’t find an action name called ‘start’ in any of my  
controllers. Rename it to, say, ‘startx’, load that url, and it works  
as expected.

Before I go off shearing this yak any further, can anyone please  
suggest how I should go about debugging this? I’d like to be able to  
discover exactly where in the stack Rails is somehow not

I realize continual test coverage across my controller actions might  
have prevented the hairiness of this yak that stands before me. I’ll  
light a TDD candle later.

Right now, I’ve gotta shear this here yak. I have tried:

- removing all plugins
- removing all my custom routes
- tried the action in different controllers
- opened a breakpointer in the controller
- making sure I haven’t used ‘start’ in some funny way anywhere in the  
app
- tried the action declaration in different controllers
- created a new rails app and _could not_ replicate the problem
- asked the Google
- begun to shave the yak’s genitals

All I want is an action called start, like I have had many times in  
the past (sans yak).

I’m about to do some more playing with the debugger, and create a  
functional test against the controller.

Thanks for reading.

---

<div class="post-metadata">

**Author:** ![tshim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c4cdca/32.png) [@tshim](https://www.ruby-forum.com/u/tshim)\
**Post date:** [July 8, 2008, 4:31am UTC](https://www.ruby-forum.com/t/shear-my-yak-deeper-debugging/142453/2 "2008-07-08T04:31:19Z")

</div>

tshim wrote:

> - begun to shave the yak’s genitals  
> You went thru all that labor _before_ just writing one stinking  
> functional test???

(Did you grep \bstart\b . -r all the code?)

> I realize continual test coverage across my controller actions might  
> have prevented the hairiness of this yak that stands before me. I’ll  
> light a TDD candle later.

That’s not TDD - you didn’t test FIRST.

Have we learned our LESSON yet???

---

<div class="post-metadata">

**Author:** ![tshim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c4cdca/32.png) [@tshim](https://www.ruby-forum.com/u/tshim)\
**Post date:** [July 8, 2008, 4:41am UTC](https://www.ruby-forum.com/t/shear-my-yak-deeper-debugging/142453/3 "2008-07-08T04:41:15Z")

</div>

I did go through the results of grepping ‘start’ – truly, nothing  
suspicious there.

There is hair everywhere now. I’ve created a new rails app, declared a  
simple controller and two actions, ‘start’ and ‘startx’.

Each url responds as expected via the browser.

Two simple functional tests,

def test\_start  
get :start  
assert\_response :success  
end

def test\_startx  
get :startx  
assert\_response :success  
end

reveal that test\_start fails while test\_startx passes. However, as I  
just wrote while coughing on yak hair, _both_ actions in the fresh app  
respond appropriately in the browser.

Anyway, I’m sure I can get to the bottom of this if I just knew how to  
get ‘deeper’ in tracing the rails stack. Any tips?

---

<div class="post-metadata">

**Author:** ![tshim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c4cdca/32.png) [@tshim](https://www.ruby-forum.com/u/tshim)\
**Post date:** [July 8, 2008, 5:26am UTC](https://www.ruby-forum.com/t/shear-my-yak-deeper-debugging/142453/4 "2008-07-08T05:26:15Z")

</div>

> Anyway, I’m sure I can get to the bottom of this if I just knew how to  
> get ‘deeper’ in tracing the rails stack. Any tips?

Post your routes.rb, and your rails -v version?

---

<div class="post-metadata">

**Author:** ![tshim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c4cdca/32.png) [@tshim](https://www.ruby-forum.com/u/tshim)\
**Post date:** [July 8, 2008, 10:52am UTC](https://www.ruby-forum.com/t/shear-my-yak-deeper-debugging/142453/5 "2008-07-08T10:52:10Z")

</div>

On 8 Jul 2008, at 05:07, tshim wrote:

> Before I go off shearing this yak any further, can anyone please  
> suggest how I should go about debugging this? I’d like to be able to  
> discover exactly where in the stack Rails is somehow not loading the  
> class properly.
> 
> Thanks for taking the time to reply, Phlip.
> 
> I’m running Rails 2.1.0.

It’s because you’ve got the debugger enabled (rails enables it in  
tests by default with 2.1).  
rdebug defines Kernel#start which means that ActionController  
considers the method not to be an action (Long version here:  
[It's always the butler - Space Vatican](http://www.spacevatican.org/2008/5/1/it-s-always-the-butler))

Fred

---

<div class="post-metadata">

**Author:** ![tshim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c4cdca/32.png) [@tshim](https://www.ruby-forum.com/u/tshim)\
**Post date:** [July 8, 2008, 7:52pm UTC](https://www.ruby-forum.com/t/shear-my-yak-deeper-debugging/142453/6 "2008-07-08T19:52:45Z")

</div>

Thanks for the tip Frederick. That is exactly the issue.

A ticket was opened for ruby-debug, and it looks like it was fixed in  
r848 at the very same time I started whining to the group about my  
yak.

* * *

action named start  
action called start

On Jul 8, 2:39 am, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![tshim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c4cdca/32.png) [@tshim](https://www.ruby-forum.com/u/tshim)\
**Post date:** [July 8, 2008, 6:07am UTC](https://www.ruby-forum.com/t/shear-my-yak-deeper-debugging/142453/7 "2008-07-08T06:07:46Z")

</div>

Before I go off shearing this yak any further, can anyone please  
suggest how I should go about debugging this? I’d like to be able to  
discover exactly where in the stack Rails is somehow not loading the  
class properly.

Thanks for taking the time to reply, Phlip.

I’m running Rails 2.1.0.

My routes: [http://pastie.org/229541](http://pastie.org/229541)

The stacktrace: [http://pastie.org/229542](http://pastie.org/229542)
