OK, got ruby-debug installed and issued the command: script/server -u
Got running in debug mode.  No more info than before.  Now what?

Arthur

On Apr 6, 12:24 pm, eengnerd <eengn...@yahoo.com> wrote:
> Nice idea, but I don't have any books or tutorials on that...don't
> even know how to start the debugger.
>
> Arthur
>
> On Apr 6, 12:16 pm, Colin Law <clan...@googlemail.com> wrote:
>
> > If you cannot see why the object at line 9 in store_controller.rb is nil
> > then now is your chance to learn about ruby-debug.  Have a look and see what
> > is happening.  (I don't know the answer).
>
> > 2009/4/6 eengnerd <eengn...@yahoo.com>
>
> > > I was successful in reaching page 184 in the book "Agile Web
> > > Development with Rails" 3rd edition and while running the website with
> > > PostGreSQL as the backend, the power went down.  The PostGreSQL
> > > database contents look OK and so do the source code files I was
> > > editing.  But whenever I click on any "Add To Cart" button in the
> > > catalog, I get the following information in the terminal window where
> > > the "script/server" command was issued.  By the way, I'm using
> > > Mongrel, not Webrick.
>
> > > Processing StoreController#add_to_cart (for 127.0.0.1 at 2009-04-06
> > > 11:49:15) [POST]
> > >  Parameters: {"commit"=>"Add to Cart",
> > > "authenticity_token"=>"2hiFEqPkmMUXAZnTJ6jN4TKkMagLt0BY0W/M6fJj1+w=",
> > > "id"=>"1"}
> > >  Product Load (1.0ms)   SELECT * FROM "products" WHERE
> > > ("products"."id" = 1)
>
> > > NoMethodError (You have a nil object when you didn't expect it!
> > > The error occurred while evaluating nil.add_product):
> > >  app/controllers/store_controller.rb:9:in `add_to_cart'
> > >  /usr/lib/ruby/1.8/mongrel.rb:159:in `process_client'
> > >  /usr/lib/ruby/1.8/mongrel.rb:158:in `each'
> > >  /usr/lib/ruby/1.8/mongrel.rb:158:in `process_client'
> > >  /usr/lib/ruby/1.8/mongrel.rb:285:in `run'
> > >  /usr/lib/ruby/1.8/mongrel.rb:285:in `initialize'
> > >  /usr/lib/ruby/1.8/mongrel.rb:285:in `new'
> > >  /usr/lib/ruby/1.8/mongrel.rb:285:in `run'
> > >  /usr/lib/ruby/1.8/mongrel.rb:268:in `initialize'
> > >  /usr/lib/ruby/1.8/mongrel.rb:268:in `new'
> > >  /usr/lib/ruby/1.8/mongrel.rb:268:in `run'
>
> > > Rendered rescues/_trace (72.4ms)
> > > Rendered rescues/_request_and_response (0.8ms)
> > > Rendering rescues/layout (internal_server_error)
>
> > > I really don't want to lose all my work, but I'm totally lost on how
> > > to fix this problem.
>
> > > Sincerely,
>
> > > Arthur
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to