hello, everyone I m working on ROR, the Agile Web Dev with Rails book. I''ve reached the chapter on creating the shopping cart (chapter 8). I keep having a problem with the same error which I can''t get past, however what''s more confusing is that it''s being generated even when I swap all my app code out for the code that I downloaded from the book''s website. When I try to add an item to the cart (http://192.168.1.7:3000/store/add_to_cart/1) I get the following>> error: >> >> - - >> Unknown action >> No action responded to add_to_cart >> -- >> >> If I try to display the cart instead >> (http://192.168.1.7:3000/store/display_cart) I get this: >> >> -- >> Unknown actionNo action responded to display_cart As far as I can see everything I need is in place. I have checked all the points such as: add_to_cart method is above private declaration of find_cart method is this error is due to some wrong config in database mapping with tables or anything? can anybody plz help me out in this matter... Thanks... Internal Virus Database is out-of-date. Checked by AVG Anti-Virus. Version: 7.0.296 / Virus Database: 267.11.4 - Release Date: 9/21/2005 _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Hi, trupti, I''m working myself through this example application right in this moment. Why don''t you just post the ddl (create.sql) you are using and the problematic code fragments (store_controller for example). Sometimes another pair of eyes is helpful... best regards Jan Prill trupti wrote:> hello, > everyone > I m working on ROR, > the Agile Web Dev with Rails book. I''ve reached the chapter on > creating the *shopping cart *(chapter 8). > I keep having a problem with the same error which I can''t get past, > however what''s more confusing is that it''s being generated even when I > swap all my app code out for the code that I downloaded from the > book''s website. > > When I try to add an *item* to the > *cart* (http://192.168.1.7:3000/store/add_to_*cart*/1 > <http://192.168.1.7:3000/store/add_to_cart/1>) I get the following > >> error: > >> > >> - - > >> Unknown action > >> No action responded to add_to_*cart* > >> -- > >> > >> If I try to display the *cart* instead > >> (http://192.168.1.7:3000/store/display_*cart* > <http://192.168.1.7:3000/store/display_cart>) I get this: > >> > >> -- > >> Unknown action > No action responded to display_*cart* > As far as I can see everything I need is in place. > > I have checked all the points such as: > add_to_cart method is above private declaration of find_cart method > is this error is due to some wrong config in database mapping with > tables or anything? > can anybody plz help me out in this matter... > Thanks... > > > > >------------------------------------------------------------------------ > >Internal Virus Database is out-of-date. >Checked by AVG Anti-Virus. >Version: 7.0.296 / Virus Database: 267.11.4 - Release Date: 9/21/2005 > > >------------------------------------------------------------------------ > >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > >
Hi trupti I had similar problems a few times, when you get problems like this make sure you clear out the browser cache occasionally, it sorted it for me. All sorts of weird things were happening and it was to do with IE(euuurgh) cacheing the pages, John On 10/6/05, trupti <trupti_nijai-gNhBwkzxu+EAZt3DtEwN1tBPR1lH4CV8@public.gmane.org> wrote:> > hello, > everyone > I m working on ROR, > the Agile Web Dev with Rails book. I''ve reached the chapter on > creating the *shopping cart *(chapter 8). > I keep having a problem with the same error which I can''t get past, > however what''s more confusing is that it''s being generated even when I > swap all my app code out for the code that I downloaded from the > book''s website. > > When I try to add an *item* to the *cart* ( > http://192.168.1.7:3000/store/add_to_*cart*/1<http://192.168.1.7:3000/store/add_to_cart/1>) > I get the following > >> error: > >> > >> - - > >> Unknown action > >> No action responded to add_to_*cart* > >> -- > >> > >> If I try to display the *cart* instead > >> (http://192.168.1.7:3000/store/display_*cart*<http://192.168.1.7:3000/store/display_cart>) > I get this: > >> > >> -- > >> Unknown action > No action responded to display_*cart* > As far as I can see everything I need is in place. > I have checked all the points such as: > add_to_cart method is above private declaration of find_cart method > is this error is due to some wrong config in database mapping with tables > or anything? > can anybody plz help me out in this matter... > Thanks... > > > > Internal Virus Database is out-of-date. > Checked by AVG Anti-Virus. > Version: 7.0.296 / Virus Database: 267.11.4 - Release Date: 9/21/2005 > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Hi Trupti, You should also try removing any cookies created earlier in the example. Cheers Mike --------------------------------------------------- From: John Knott <john.knott-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Date: Fri, 7 Oct 2005 00:26:20 +0100 Reply-to: John Knott <john.knott-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails] regarding add_to_cart method Hi trupti I had similar problems a few times, when you get problems like this make sure you clear out the browser cache occasionally, it sorted it for me. All sorts of weird things were happening and it was to do with IE(euuurgh) cacheing the pages, John On 10/6/05, trupti <trupti_nijai-gNhBwkzxu+EAZt3DtEwN1tBPR1lH4CV8@public.gmane.org> wrote: hello, everyone I m working on ROR, the Agile Web Dev with Rails book. I''ve reached the chapter on creating the shopping cart (chapter 8). I keep having a problem with the same error which I can''t get past, however what''s more confusing is that it''s being generated even when I swap all my app code out for the code that I downloaded from the book''s website. <snip>