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.
Hi again,
so here is the excerpt of the code:
class StoreController < ApplicationController
def index
@products = Product.find_products_for_sale
end
def add_to_cart
debugger <-------------------------------
product = Product.find(params[:id])
@cart = find_cart
@cart.add_product(product)
rescue ActiveRecord::RecordNotFound
logger.error("Attempt to access invalid product #{params[:id]}")
flash[:notice] = "Invalid Product"
redirect_to :action => 'index'
end
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.
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
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.
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.
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.
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
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)
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
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