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
Here I start the server:
========================================================================
D:\InstantRails\rails_apps\depot>ruby script/server --debugger
=> Booting Mongrel
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
=> Debugger enabled
=> Call with -d to detach
=> Ctrl-C to shutdown server
========================================================================
This is what I'm getting in the browser:
==================================================
NoMethodError in StoreController#add_to_cart
undefined method `run_init_script' for Debugger:Module
======================================================================
Here is what I'm getting on the console:
=============================================================================
NoMethodError (undefined method `run_init_script' for Debugger:Module):
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3-x86-mswin32/lib/ruby-debug-base.rb:239:in
`debugger'
app/controllers/store_controller.rb:7:in `add_to_cart'
=============================================================================
Hope this helps (I'm novice here and trying to learn ROR).
Thank you in advance for any help,
Dani
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.