# debugger problems

**URL:** <https://discuss.rubyonrails.org/t/debugger-problems/50407>\
**Category:** rubyonrails-talk\
**Created:** [March 25, 2010, 12:51pm UTC](https://discuss.rubyonrails.org/t/debugger-problems/50407 "2010-03-25T12:51:57Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [March 25, 2010, 12:51pm UTC](https://discuss.rubyonrails.org/t/debugger-problems/50407/1 "2010-03-25T12:51:57Z")

</div>

Hi, I'm trying to debug my web application using the 'debugger' method, unfortunately I get an error that the debugger method could not be found. I have installed ruby-debu and started it with 'ruby script/server --debugger', I can see that the debug is enabled, but when I use the debugger let say in the controller, and run the application, it hits an error. using e.g. \<%= (debug @something) %\> works.

Any idees ?. Thank you in advance

---

<div class="post-metadata">

**Author:** ![David\_Chua](https://avatars.discourse-cdn.com/v4/letter/d/41988e/32.png) [@David\_Chua](https://discuss.rubyonrails.org/u/David_Chua)\
**Post date:** [March 25, 2010, 1:04pm UTC](https://discuss.rubyonrails.org/t/debugger-problems/50407/2 "2010-03-25T13:04:17Z")

</div>

Hi Dani,

You got to be more explicit about the error that you’re getting.

David [http://dchua.com](http://dchua.com)

---

<div class="post-metadata">

**Author:** ![Colin\_Law1](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@Colin\_Law1](https://discuss.rubyonrails.org/u/Colin_Law1)\
**Post date:** [March 25, 2010, 1:24pm UTC](https://discuss.rubyonrails.org/t/debugger-problems/50407/3 "2010-03-25T13:24:35Z")

</div>

> Hi Dani,
> 
> You got to be more explicit about the error that you're getting.

And show the code where the error occurs

Colin

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [March 25, 2010, 1:34pm UTC](https://discuss.rubyonrails.org/t/debugger-problems/50407/4 "2010-03-25T13:34:43Z")

</div>

Wow, thank you for your quick response.

I'll provide the exact error message and an excerpt of the code where the 'debugger' has been integrated.

I'll do it today evening. Dani

---

<div class="post-metadata">

**Author:** ![Colin\_Law1](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@Colin\_Law1](https://discuss.rubyonrails.org/u/Colin_Law1)\
**Post date:** [March 25, 2010, 1:41pm UTC](https://discuss.rubyonrails.org/t/debugger-problems/50407/5 "2010-03-25T13:41:48Z")

</div>

> Wow, thank you for your quick response.
> 
> I'll provide the exact error message and an excerpt of the code where the 'debugger' has been integrated.

Include the full trace dump also, assuming there is one.

By the way it is best not to snip all the message to which you are replying so that each message makes some sense in case the threading gets broken.

Colin

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [March 25, 2010, 7:22pm UTC](https://discuss.rubyonrails.org/t/debugger-problems/50407/6 "2010-03-25T19:22:38Z")

</div>

Hi again, so here is the excerpt of the code: class StoreController \< ApplicationController &nbsp;&nbsp;def index &nbsp;&nbsp;&nbsp;&nbsp;@products = Product.find\_products\_for\_sale &nbsp;&nbsp;end &nbsp;&nbsp;def add\_to\_cart &nbsp;&nbsp;&nbsp;&nbsp;debugger \<------------------------------- &nbsp;&nbsp;&nbsp;&nbsp;product = Product.find(params[:id]) &nbsp;&nbsp;&nbsp;&nbsp;@cart = find\_cart &nbsp;&nbsp;&nbsp;&nbsp;@cart.add\_product(product) &nbsp;&nbsp;rescue ActiveRecord::RecordNotFound &nbsp;&nbsp;&nbsp;&nbsp;logger.error("Attempt to access invalid product #{params[:id]}") &nbsp;&nbsp;&nbsp;&nbsp;flash[:notice] = "Invalid Product" &nbsp;&nbsp;&nbsp;&nbsp;redirect\_to :action =\> 'index' &nbsp;&nbsp;end

Here I start the server:

---

<div class="post-metadata">

**Author:** ![Colin\_Law1](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@Colin\_Law1](https://discuss.rubyonrails.org/u/Colin_Law1)\
**Post date:** [March 25, 2010, 8:33pm UTC](https://discuss.rubyonrails.org/t/debugger-problems/50407/7 "2010-03-25T20:33:10Z")

</div>

What do you see if you do gem list in the console. You should see ruby-debug and ruby-debug-base there.

Are you using radrails? Googling for the error message gave a radrails issue as a possible cause.

Colin

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [March 25, 2010, 9:09pm UTC](https://discuss.rubyonrails.org/t/debugger-problems/50407/8 "2010-03-25T21:09:50Z")

</div>

> What do you see if you do gem list in the console. You should see ruby-debug and ruby-debug-base there.
> 
> Are you using radrails? Googling for the error message gave a radrails issue as a possible cause.
> 
> Colin

Hi Colin, This is what I get (gem list): actionmailer (2.3.5, 2.0.2) actionpack (2.3.5, 2.0.2) activerecord (2.3.5, 2.0.2) activeresource (2.3.5, 2.0.2) activesupport (2.3.5, 2.0.2) capistrano (2.1.0) cgi\_multipart\_eof\_fix (2.5.0) cmdparse (2.0.2) columnize (0.3.1) fxri (0.3.6) fxruby (1.6.12) gem\_plugin (0.2.3) highline (1.4.0) hpricot (0.6) linecache (0.43) log4r (1.0.5) mongrel (1.1.2) mysql (2.7.3) needle (1.3.0) net-sftp (1.1.0) net-ssh (1.1.2) rack (1.0.1) rails (2.3.5, 2.0.2) rake (0.8.7, 0.8.1, 0.8.0, 0.7.3) ruby-debug-base (0.10.3) \<-------------------------------- ruby-debug-ide (0.4.6) \<-------------------------------- rubygems-update (1.3.6, 1.0.1) sources (0.0.1) sqlite3-ruby (1.2.1) win32-api (1.0.4) win32-clipboard (0.4.3) win32-dir (0.3.2) win32-eventlog (0.4.6) win32-file (0.5.4) win32-file-stat (1.2.7) win32-process (0.5.3) win32-sapi (0.1.4) win32-sound (0.4.1) windows-api (0.2.0) windows-pr (0.7.2)

I have Aptana installed (radrails ?). Dani

---

<div class="post-metadata">

**Author:** ![Colin\_Law1](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@Colin\_Law1](https://discuss.rubyonrails.org/u/Colin_Law1)\
**Post date:** [March 25, 2010, 9:34pm UTC](https://discuss.rubyonrails.org/t/debugger-problems/50407/9 "2010-03-25T21:34:18Z")

</div>

Well you are beyond my knowledge base here. The majority of Rails users are on macs or linux, notably Ubuntu, which includes me.

[http://rubyforge.org/tracker/index.php?func=detail&aid=26656&group\_id=1900&atid=7436](http://rubyforge.org/tracker/index.php?func=detail&aid=26656&group_id=1900&atid=7436) includes the comment fixed in ruby-debug-ide 0.4.8 How you go about getting the later version I do not know.

On Ubuntu I do not have ruby-debug-ide but have ruby-debug instead

Any Aptana experts out there?

If you don't get any help here it might be worth starting a new thread with the error and Aptana in the subject.

Alternatively try Ubuntu, it is great. You can set up a dual boot on the PC so you can still use windows, which is what I did and now I hardly use windows at all. Suddenly I feel that I am back in control of the PC again.

Colin

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [March 25, 2010, 9:44pm UTC](https://discuss.rubyonrails.org/t/debugger-problems/50407/10 "2010-03-25T21:44:56Z")

</div>

Colin Law wrote:

> Well you are beyond my knowledge base here. The majority of Rails users are on macs or linux, notably Ubuntu, which includes me.
> 
> [http://rubyforge.org/tracker/index.php?func=detail&aid=26656&group\_id=1900&atid=7436](http://rubyforge.org/tracker/index.php?func=detail&aid=26656&group_id=1900&atid=7436) includes the comment fixed in ruby-debug-ide 0.4.8 How you go about getting the later version I do not know.
> 
> On Ubuntu I do not have ruby-debug-ide but have ruby-debug instead
> 
> Any Aptana experts out there?
> 
> If you don't get any help here it might be worth starting a new thread with the error and Aptana in the subject.
> 
> Alternatively try Ubuntu, it is great. You can set up a dual boot on the PC so you can still use windows, which is what I did and now I hardly use windows at all. Suddenly I feel that I am back in control of the PC again.
> 
> Colin

Ok, thank you very much colin for taking time to look at my issue. I'm not so familiar with linux, but I assume I have to start looking at it. Thank you, Dani

---

<div class="post-metadata">

**Author:** ![Michael\_Pavling](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@Michael\_Pavling](https://discuss.rubyonrails.org/u/Michael_Pavling)\
**Post date:** [March 25, 2010, 10:02pm UTC](https://discuss.rubyonrails.org/t/debugger-problems/50407/11 "2010-03-25T22:02:31Z")

</div>

> Colin Law wrote:
> 
> > Alternatively try Ubuntu, it is great. You can set up a dual boot on the PC so you can still use windows

+1 Or even easier; run a virtual machine (VMWare or Virtual Box) inside Windows to experiment with.

> I'm not so familiar with linux, but I assume I have to start looking at it.

After using Windows when I started with Rails, I moved to Linux just over a year ago, and haven't looked back. It's extraordinarily easy to get running with, and you can just pretend it's Windows for a while and stick to the GUI while you get comfortable dipping in and out of terminal windows.

Make the leap 🙂

---

<div class="post-metadata">

**Author:** ![Colin\_Law1](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@Colin\_Law1](https://discuss.rubyonrails.org/u/Colin_Law1)\
**Post date:** [March 26, 2010, 8:48am UTC](https://discuss.rubyonrails.org/t/debugger-problems/50407/12 "2010-03-26T08:48:34Z")

</div>

If you do decide to try Ubuntu there is a good getting started guide at [Main page - Ubuntu Pocket Guide and Reference](http://www.ubuntupocketguide.com/index_main.html) and join the ubuntu users mailing list which is very helpful for beginners and experienced alike, [ubuntu-users Info Page](https://lists.ubuntu.com/mailman/listinfo/ubuntu-users).

Colin

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [March 26, 2010, 9:49am UTC](https://discuss.rubyonrails.org/t/debugger-problems/50407/13 "2010-03-26T09:49:54Z")

</div>

Thank you all for your support. Yes, I'll try Linux.

Regards,

Dani

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [March 27, 2010, 2:21pm UTC](https://discuss.rubyonrails.org/t/debugger-problems/50407/14 "2010-03-27T14:21:26Z")

</div>

Dani Dani wrote:

> Thank you all for your support. Yes, I'll try Linux.
> 
> Regards,
> 
> Dani

Well, I am using Debian (upstream of Ubuntu) and I am getting exactly the same error. I do have Aptana RadRails installed, but I am using it only as an editor. I run the app from the app-root directory with script/server --debugger, and it runs until I hit the debugger statement then it crashes with the "undefined method `run\_init\_script' for Debugger:Module" error.

I'll keep you posted if I figure out a fix.

Don Ziesig

---

<div class="post-metadata">

**Author:** ![Colin\_Law1](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@Colin\_Law1](https://discuss.rubyonrails.org/u/Colin_Law1)\
**Post date:** [March 27, 2010, 2:36pm UTC](https://discuss.rubyonrails.org/t/debugger-problems/50407/15 "2010-03-27T14:36:33Z")

</div>

What does gem list show? It should have ruby-debug and ruby-debug-base but not ruby-debug-ide which is apparently the radrails one that can cause the problem.

Colin

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [March 30, 2010, 5:14am UTC](https://discuss.rubyonrails.org/t/debugger-problems/50407/16 "2010-03-30T05:14:45Z")

</div>

Colin Law wrote:

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [March 30, 2010, 5:27am UTC](https://discuss.rubyonrails.org/t/debugger-problems/50407/17 "2010-03-30T05:27:26Z")

</div>

Ivan Maltz wrote:

> I had the same problem. I ran 'gem install ruby-debug' and now all is good.

Hi, may I ask, are you using linux or windows operating system ?. I'm using windows and did the same ('gem install ruby-debug'), still same issue as mentioned above. If you type 'gem list', do you get: ruby-debug-base and ruby-debug-ide listed, or ruby-debug-base and ruby-debug ? Thanks, dani

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [March 30, 2010, 5:31am UTC](https://discuss.rubyonrails.org/t/debugger-problems/50407/18 "2010-03-30T05:31:39Z")

</div>

Dani Dani wrote:

> Hi, may I ask, are you using linux or windows operating system ?. I'm using windows and did the same ('gem install ruby-debug'), still same issue as mentioned above.

I'm using Windows 7

> If you type 'gem list', do you get: ruby-debug-base and ruby-debug-ide listed, or ruby-debug-base and ruby-debug ?

Originally, I had: ruby-debug-base (0.10.3) ruby-debug-ide (0.4.5)

Now, after running 'gem install ruby-debug' I get: ruby-debug (0.10.3) ruby-debug-base (0.10.3) ruby-debug-ide (0.4.5)

-Ivan

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [March 30, 2010, 6:01am UTC](https://discuss.rubyonrails.org/t/debugger-problems/50407/19 "2010-03-30T06:01:50Z")

</div>

Ivan Maltz wrote:

> > I'm using Windows 7
> 
> > If you type 'gem list', do you get: ruby-debug-base and ruby-debug-ide listed, or ruby-debug-base and ruby-debug ?
> 
> Originally, I had: ruby-debug-base (0.10.3) ruby-debug-ide (0.4.5)
> 
> Now, after running 'gem install ruby-debug' I get: ruby-debug (0.10.3) ruby-debug-base (0.10.3) ruby-debug-ide (0.4.5)
> 
> -Ivan

I'm using xp prof. well, I'll try today evening again the 'gem install ruby-debug', even though I think I have done it already (otherwise I would'nt have the ruby-debug-base and ruby-debug-ide. Thank you, Dani

---

<div class="post-metadata">

**Author:** ![Colin\_Law1](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@Colin\_Law1](https://discuss.rubyonrails.org/u/Colin_Law1)\
**Post date:** [March 30, 2010, 7:50am UTC](https://discuss.rubyonrails.org/t/debugger-problems/50407/20 "2010-03-30T07:50:23Z")

</div>

If still no joy then you could try removing ruby-debug-ide as it is not required for normal use of ruby-debug and it is the one giving the problems I think. It is something to do with Aptana/radrails

Colin

[Next page](https://discuss.rubyonrails.org/t/debugger-problems/50407.md?page=2)
