Rob Redford
2005-Sep-25 17:52 UTC
(newbie) Missing Template Error using Rolling With Rails Tutorials
Hi all, New to the list, Ruby, & RoR. I''ve been going through the Rolling With Rails tutorial, but am getting the following error when the instructions tell you to add the @recipes = Recipe.find_all line to the RecipeController: Template is missing Missing template ./script/../config/..//app/views//recipe/index.rhtml The index.rhtml file is right where it''s supposed to be, and the code is correct (as far as I can tell, I even used the downloadable version of the script with the same result). Not sure what''s going on. I''m using Rails 13.1 with WEBrick on WinXP Pro SP2. Am I missing something obvious? Thanks, -- Rob Redford :: rob.redford-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org This message was sent on Sunday, September 25, 2005 @ 11:52:45 AM (Mountain Daylight Time) _________________________________________________________________
Duane Johnson
2005-Sep-26 14:36 UTC
Re: (newbie) Missing Template Error using Rolling With Rails Tutorials
On Sep 25, 2005, at 10:52 AM, Rob Redford wrote:> Hi all, > > New to the list, Ruby, & RoR. I''ve been going through the Rolling > With Rails tutorial, but am getting the following error when the > instructions tell you to add the @recipes = Recipe.find_all line to > the RecipeController: > > Template is missing > > Missing template ./script/../config/..//app/views//recipe/index.rhtml >Seems strange to me. Do other actions work properly? Is it just this particular one that''s causing trouble?> > The index.rhtml file is right where it''s supposed to be, and the code > is correct (as far as I can tell, I even used the downloadable version > of the script with the same result). Not sure what''s going on. I''m > using Rails 13.1 with WEBrick on WinXP Pro SP2. Am I missing > something obvious? >If you haven''t resolved it yet, perhaps you could post the controller code here. I can''t see anything wrong with your setup from here.> Thanks, > > -- > Rob Redford :: rob.redford-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > This message was sent on Sunday, September 25, 2005 @ 11:52:45 AM > (Mountain Daylight Time)P.S. Are you from around the Provo, UT area? _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org lists.rubyonrails.org/mailman/listinfo/rails
Rob Redford
2005-Sep-26 16:44 UTC
RE: (newbie) Missing Template Error using Rolling With Rails Tutorials
Hi Duane, No, I''m from Denver actually :) I can''t get anything to function at all, I just get the error when I try to load the main page (localhost/recipe). Everything worked fine until I added the @recipes line, and then I haven''t been able to get it to function with my or Curt''s code since. It''s almost like there''s something wrong with Rails itself, but I uninstalled and reinstalled that to test that theory as well with no joy. Here''s the controller code from recipe_controller.rb (this is directly from the article''s downloadable code archive - I tried it to see if I got the same error and I do): class RecipeController < ApplicationController scaffold :recipe def list @recipes = Recipe.find_all end def edit @recipe = Recipe.find(@params["id"]) @categories = Category.find_all end end Any thoughts? -- Rob Redford :: rob.redford-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org This message was sent on Monday, September 26, 2005 @ 10:42:27 AM (MST) _________________________________________________________________> -----Original Message----- > From: Duane Johnson [mailto:duane.johnson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org] > Sent: Monday, September 26, 2005 8:36 AM > To: Rob Redford; rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails] (newbie) Missing Template Error using Rolling With Rails > Tutorials > > > On Sep 25, 2005, at 10:52 AM, Rob Redford wrote: > > > Hi all, > > New to the list, Ruby, & RoR. I''ve been going through the Rolling > With Rails tutorial, but am getting the following error when the > instructions tell you to add the @recipes = Recipe.find_all line to > the RecipeController: > > Template is missing > > Missing template ./script/../config/..//app/views//recipe/index.rhtml > > > > Seems strange to me. Do other actions work properly? Is it just this particular one > that''s causing trouble? > > > The index.rhtml file is right where it''s supposed to be, and the code > is correct (as far as I can tell, I even used the downloadable version > of the script with the same result). Not sure what''s going on. I''m > using Rails 13.1 with WEBrick on WinXP Pro SP2. Am I missing > something obvious? > > > > If you haven''t resolved it yet, perhaps you could post the controller code here. I > can''t see anything wrong with your setup from here. > > > Thanks, > > -- > Rob Redford :: rob.redford-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > This message was sent on Sunday, September 25, 2005 @ 11:52:45 AM > (Mountain Daylight Time) > > > > P.S. Are you from around the Provo, UT area?
Bill Abel
2005-Sep-26 19:56 UTC
Re: (newbie) Missing Template Error using Rolling With Rails Tutorials
This is the sort of problem I had running rails on Panther. I''ve got two macs, one with Tiger. No problems when I ran the same code on OS X Tiger. However, I got odd errors when I updated files in my app (with correct code) while using Panther. -b On Sep 26, 2005, at 3:46 PM, Duane Johnson wrote:> > On Sep 26, 2005, at 9:44 AM, Rob Redford wrote: > > >> Hi Duane, >> >> No, I''m from Denver actually :) >> >> I can''t get anything to function at all, I just get the error when >> I try to load the main page (localhost/recipe). Everything >> worked fine until I added the @recipes line, and then I haven''t >> been able to get it to function with my or Curt''s code since. >> It''s almost like there''s something wrong with Rails itself, but I >> uninstalled and reinstalled that to test that theory as well with >> no joy. Here''s the controller code from recipe_controller.rb >> (this is directly from the article''s downloadable code archive - I >> tried it to see if I got the same error and I do): >> >> class RecipeController < ApplicationController >> scaffold :recipe >> >> def list >> @recipes = Recipe.find_all >> end >> >> def edit >> @recipe = Recipe.find(@params["id"]) >> @categories = Category.find_all >> end >> end >> >> Any thoughts? >> >> > Very strange. I''m not seeing anything wrong at all. > > One thought--I''ve started using the new find call instead of the > deprecated find_all. It should be backwards compatible, however: > > def list > @recipes = Recipe.find :all > end > > def edit > @recipe = Recipe.find(params[:id]) > @categories = Category.find :all > end > > As far as I know, it''s only "cool"... not essential ;) > > As an afterthought, are you sure your routes.rb file is set up > correctly? > > >> -- >> Rob Redford :: rob.redford-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org >> This message was sent on Monday, September 26, 2005 @ 10:42:27 AM >> (MST) >> _________________________________________________________________ >> >> >> >> >>> -----Original Message----- >>> From: Duane Johnson [mailto:duane.johnson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org] >>> Sent: Monday, September 26, 2005 8:36 AM >>> To: Rob Redford; rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> Subject: Re: [Rails] (newbie) Missing Template Error using >>> Rolling With Rails >>> Tutorials >>> >>> >>> On Sep 25, 2005, at 10:52 AM, Rob Redford wrote: >>> >>> >>> Hi all, >>> >>> New to the list, Ruby, & RoR. I''ve been going through the >>> Rolling >>> With Rails tutorial, but am getting the following error when >>> the >>> instructions tell you to add the @recipes = Recipe.find_all >>> line to >>> the RecipeController: >>> >>> Template is missing >>> >>> Missing template ./script/../config/..//app/views//recipe/ >>> index.rhtml >>> >>> >>> >>> Seems strange to me. Do other actions work properly? Is it >>> just this particular one >>> that''s causing trouble? >>> >>> >>> The index.rhtml file is right where it''s supposed to be, and >>> the code >>> is correct (as far as I can tell, I even used the >>> downloadable version >>> of the script with the same result). Not sure what''s going >>> on. I''m >>> using Rails 13.1 with WEBrick on WinXP Pro SP2. Am I missing >>> something obvious? >>> >>> >>> >>> If you haven''t resolved it yet, perhaps you could post the >>> controller code here. I >>> can''t see anything wrong with your setup from here. >>> >>> >>> Thanks, >>> >>> -- >>> Rob Redford :: rob.redford-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org >>> This message was sent on Sunday, September 25, 2005 @ >>> 11:52:45 AM >>> (Mountain Daylight Time) >>> >>> >>> >>> P.S. Are you from around the Provo, UT area? >>> >>> >> >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> lists.rubyonrails.org/mailman/listinfo/rails >> >> > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > lists.rubyonrails.org/mailman/listinfo/rails >William Abel Senior Search Consultant 800-448-0926, x113 wabel-K5nm2JIIwfaCCIQ1qEoUnJqQE7yCjDx5@public.gmane.org Wheless & Associates™ | The Catalyst for Extraordinary Leadership™ New York | Washington | Houston | Birmingham | Naples
Rob Redford
2005-Sep-26 20:08 UTC
RE: (newbie) Missing Template Error using Rolling With RailsTutorials
Duane, No, I haven''t checked routes.rb...but wouldn''t know how to mess with it if I had :) Curt''s tutorial was my first experience with Rails, and I don''t think anything''s mentioned about it there. This is what it says now: ActionController::Routing::Routes.draw do |map| # Add your own custom routes here. # The priority is based upon order of creation: first created -> highest priority. # Here''s a sample route: # map.connect ''products/:id'', :controller => ''catalog'', :action => ''view'' # Keep in mind you can assign values other than :controller and :action # Allow downloading Web Service WSDL as a file with an extension # instead of a file named ''wsdl'' map.connect '':controller/service.wsdl'', :action => ''wsdl'' # Install the default route as the lowest priority. map.connect '':controller/:action/:id'' end Another odd thing is that the path in the error message doesn''t make any sense to me. -- Rob Redford :: rob.redford-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org This message was sent on Monday, September 26, 2005 @ 2:07:19 PM _________________________________________________________________> -----Original Message----- > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails- > bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Duane Johnson > Sent: Monday, September 26, 2005 2:47 PM > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails] (newbie) Missing Template Error using Rolling With RailsTutorials > > > Very strange. I''m not seeing anything wrong at all. > > One thought--I''ve started using the new find call instead of the > deprecated find_all. It should be backwards compatible, however: > > def list > @recipes = Recipe.find :all > end > > def edit > @recipe = Recipe.find(params[:id]) > @categories = Category.find :all > end > > As far as I know, it''s only "cool"... not essential ;) > > As an afterthought, are you sure your routes.rb file is set up > correctly?
Dave Silvester
2005-Sep-26 20:17 UTC
Re: (newbie) Missing Template Error using Rolling With Rails Tutorials
On Monday 26 Sep 2005 17:44, Rob Redford wrote:> Any thoughts?One small one: if in doubt, always kill and restart WEBrick. WEBrick is weird with some types of errors, and seems to get stuck on them even after you''ve fixed your code. Restarting seems to fix it, although I''m not sure that''s what''s actually happening in your case. ~Dave -- Dave Silvester Rent-A-Monkey Website Development Web: rentamonkey.com
Rob Redford
2005-Sep-26 20:29 UTC
RE: (newbie) Missing Template Error using Rolling With RailsTutorials
How did you guys work around the problem? Did restarting it help? I''ve tried that with no joy, myself... -- Rob Redford :: rob.redford-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org This message was sent on Monday, September 26, 2005 @ 2:28:56 PM _________________________________________________________________> -----Original Message----- > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails- > bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Bill Abel > Sent: Monday, September 26, 2005 1:57 PM > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails] (newbie) Missing Template Error using Rolling With RailsTutorials > > This is the sort of problem I had running rails on Panther. I''ve got > two macs, one with Tiger. No problems when I ran the same code on OS > X Tiger. However, I got odd errors when I updated files in my app > (with correct code) while using Panther. > -b > > On Sep 26, 2005, at 3:46 PM, Duane Johnson wrote: > > > > > On Sep 26, 2005, at 9:44 AM, Rob Redford wrote: > > > > > >> Hi Duane, > >> > >> No, I''m from Denver actually :) > >> > >> I can''t get anything to function at all, I just get the error when > >> I try to load the main page (localhost/recipe). Everything > >> worked fine until I added the @recipes line, and then I haven''t > >> been able to get it to function with my or Curt''s code since. > >> It''s almost like there''s something wrong with Rails itself, but I > >> uninstalled and reinstalled that to test that theory as well with > >> no joy. Here''s the controller code from recipe_controller.rb > >> (this is directly from the article''s downloadable code archive - I > >> tried it to see if I got the same error and I do): > >> > >> class RecipeController < ApplicationController > >> scaffold :recipe > >> > >> def list > >> @recipes = Recipe.find_all > >> end > >> > >> def edit > >> @recipe = Recipe.find(@params["id"]) > >> @categories = Category.find_all > >> end > >> end > >> > >> Any thoughts? > >> > >> > > Very strange. I''m not seeing anything wrong at all. > > > > One thought--I''ve started using the new find call instead of the > > deprecated find_all. It should be backwards compatible, however: > > > > def list > > @recipes = Recipe.find :all > > end > > > > def edit > > @recipe = Recipe.find(params[:id]) > > @categories = Category.find :all > > end > > > > As far as I know, it''s only "cool"... not essential ;) > > > > As an afterthought, are you sure your routes.rb file is set up > > correctly? > > > > > >> -- > >> Rob Redford :: rob.redford-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > >> This message was sent on Monday, September 26, 2005 @ 10:42:27 AM > >> (MST) > >> > _________________________________________________________________ > >> > >> > >> > >> > >>> -----Original Message----- > >>> From: Duane Johnson [mailto:duane.johnson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org] > >>> Sent: Monday, September 26, 2005 8:36 AM > >>> To: Rob Redford; rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >>> Subject: Re: [Rails] (newbie) Missing Template Error using > >>> Rolling With Rails > >>> Tutorials > >>> > >>> > >>> On Sep 25, 2005, at 10:52 AM, Rob Redford wrote: > >>> > >>> > >>> Hi all, > >>> > >>> New to the list, Ruby, & RoR. I''ve been going through the > >>> Rolling > >>> With Rails tutorial, but am getting the following error when > >>> the > >>> instructions tell you to add the @recipes = Recipe.find_all > >>> line to > >>> the RecipeController: > >>> > >>> Template is missing > >>> > >>> Missing template ./script/../config/..//app/views//recipe/ > >>> index.rhtml > >>> > >>> > >>> > >>> Seems strange to me. Do other actions work properly? Is it > >>> just this particular one > >>> that''s causing trouble? > >>> > >>> > >>> The index.rhtml file is right where it''s supposed to be, and > >>> the code > >>> is correct (as far as I can tell, I even used the > >>> downloadable version > >>> of the script with the same result). Not sure what''s going > >>> on. I''m > >>> using Rails 13.1 with WEBrick on WinXP Pro SP2. Am I missing > >>> something obvious? > >>> > >>> > >>> > >>> If you haven''t resolved it yet, perhaps you could post the > >>> controller code here. I > >>> can''t see anything wrong with your setup from here. > >>> > >>> > >>> Thanks, > >>> > >>> -- > >>> Rob Redford :: rob.redford-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > >>> This message was sent on Sunday, September 25, 2005 @ > >>> 11:52:45 AM > >>> (Mountain Daylight Time) > >>> > >>> > >>> > >>> P.S. Are you from around the Provo, UT area? > >>> > >>> > >> > >> _______________________________________________ > >> Rails mailing list > >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >> lists.rubyonrails.org/mailman/listinfo/rails > >> > >> > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > lists.rubyonrails.org/mailman/listinfo/rails > > > > > > William Abel > Senior Search Consultant > 800-448-0926, x113 > wabel-K5nm2JIIwfaCCIQ1qEoUnJqQE7yCjDx5@public.gmane.org > > Wheless & AssociatesT | The Catalyst for Extraordinary LeadershipT > > New York | Washington | Houston | Birmingham | Naples > > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > lists.rubyonrails.org/mailman/listinfo/rails
Duane Johnson
2005-Sep-26 20:46 UTC
Re: (newbie) Missing Template Error using Rolling With Rails Tutorials
On Sep 26, 2005, at 9:44 AM, Rob Redford wrote:> Hi Duane, > > No, I''m from Denver actually :) > > I can''t get anything to function at all, I just get the error when > I try to load the main page (localhost/recipe). Everything > worked fine until I added the @recipes line, and then I haven''t > been able to get it to function with my or Curt''s code since. It''s > almost like there''s something wrong with Rails itself, but I > uninstalled and reinstalled that to test that theory as well with > no joy. Here''s the controller code from recipe_controller.rb (this > is directly from the article''s downloadable code archive - I tried > it to see if I got the same error and I do): > > class RecipeController < ApplicationController > scaffold :recipe > > def list > @recipes = Recipe.find_all > end > > def edit > @recipe = Recipe.find(@params["id"]) > @categories = Category.find_all > end > end > > Any thoughts? >Very strange. I''m not seeing anything wrong at all. One thought--I''ve started using the new find call instead of the deprecated find_all. It should be backwards compatible, however: def list @recipes = Recipe.find :all end def edit @recipe = Recipe.find(params[:id]) @categories = Category.find :all end As far as I know, it''s only "cool"... not essential ;) As an afterthought, are you sure your routes.rb file is set up correctly?> -- > Rob Redford :: rob.redford-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > This message was sent on Monday, September 26, 2005 @ 10:42:27 AM > (MST) > _________________________________________________________________ > > > >> -----Original Message----- >> From: Duane Johnson [mailto:duane.johnson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org] >> Sent: Monday, September 26, 2005 8:36 AM >> To: Rob Redford; rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> Subject: Re: [Rails] (newbie) Missing Template Error using >> Rolling With Rails >> Tutorials >> >> >> On Sep 25, 2005, at 10:52 AM, Rob Redford wrote: >> >> >> Hi all, >> >> New to the list, Ruby, & RoR. I''ve been going through the >> Rolling >> With Rails tutorial, but am getting the following error when the >> instructions tell you to add the @recipes = Recipe.find_all >> line to >> the RecipeController: >> >> Template is missing >> >> Missing template ./script/../config/..//app/views//recipe/ >> index.rhtml >> >> >> >> Seems strange to me. Do other actions work properly? Is it just >> this particular one >> that''s causing trouble? >> >> >> The index.rhtml file is right where it''s supposed to be, and >> the code >> is correct (as far as I can tell, I even used the >> downloadable version >> of the script with the same result). Not sure what''s going >> on. I''m >> using Rails 13.1 with WEBrick on WinXP Pro SP2. Am I missing >> something obvious? >> >> >> >> If you haven''t resolved it yet, perhaps you could post the >> controller code here. I >> can''t see anything wrong with your setup from here. >> >> >> Thanks, >> >> -- >> Rob Redford :: rob.redford-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org >> This message was sent on Sunday, September 25, 2005 @ >> 11:52:45 AM >> (Mountain Daylight Time) >> >> >> >> P.S. Are you from around the Provo, UT area? >> > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > lists.rubyonrails.org/mailman/listinfo/rails >