I''m currently caches_page the show method in my Image controller. The show method looks at @params[''id''] to determine what output should be generated. The first time I access the method, say with http://localhost/public/image/show/1.jpg, the appropriate directories get created in /public (i.e. public/image/show/1.jpg). However, when I try to retrieve http://localhost//image/show/2.jpg, I get this error: "ActionController::RoutingError (No route for path: "2.jpg")" When I remove public/image, it works on one image, then gives that error on any subsequent access. Not sure what''s going on here... Joe
I just upgraded my application to 0.11.1, and I''m getting the following error: Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) NameError (uninitialized class variable @@page_cache_extension in ActionController::Caching::Pages::ClassMethods): /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/caching.rb:102:in `page_cache_file'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/caching.rb:107:in `page_cache_path'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/caching.rb:85:in `cache_page'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/caching.rb:129:in `cache_page'' (eval):1:in `class_eval'' (eval):1:in `call'' I''m using caches_page. Ideas? Thanks, Joe
> I''m using caches_page. Ideas?The bug is fixed in SVN/beta gems. -- David Heinemeier Hansson, http://www.basecamphq.com/ -- Web-based Project Management http://www.rubyonrails.org/ -- Web-application framework for Ruby http://www.loudthinking.com/ -- Broadcasting Brain
Is there a workaround for now? On Apr 6, 2005 1:54 PM, David Heinemeier Hansson <david-OiTZALl8rpK0mm7Ywyx6yg@public.gmane.org> wrote:> > I''m using caches_page. Ideas? > > The bug is fixed in SVN/beta gems. > -- > David Heinemeier Hansson, > http://www.basecamphq.com/ -- Web-based Project Management > http://www.rubyonrails.org/ -- Web-application framework for Ruby > http://www.loudthinking.com/ -- Broadcasting Brain > >
On Apr 6, 2005 3:56 PM, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Is there a workaround for now?You can checkout the rails trunk to your /vendor/rails directory, restart your webserver, and you''ll be running the latest version. If something in it breaks something else, just delete or rename rails and it goes back to using the standard rails install. -- rick http://techno-weenie.net
On Apr 6, 2005 1:51 PM, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I just upgraded my application to 0.11.1, and I''m getting the following error:I fixed the error by using SVN rails. Now, the cache files are being generated/dumped to file system. All good so far. But on a page refresh, it generates the cache files again. And on another refresh, generates them again. Any ideas? I''m storing images, but I tested it with text and the text file was overwritten on each refresh as well. Thanks, Joe
Joe- Can you post the output from your Rails log? It would probably help us debug this. Before that thought, are you running your application on a virtual host, or as a subdirectory? There is a bug where the cache files written when in a non-vhost environment contain the full path of the request_uri. I wrote a patch for this that you can find here <http://dev.rubyonrails.com/ticket/1004>. If that''s not what your problem is, posting some logs would help us help you out. Cheers, Ben On Apr 6, 2005 8:19 PM, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Apr 6, 2005 1:51 PM, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I just upgraded my application to 0.11.1, and I''m getting the following error: > > I fixed the error by using SVN rails. > > Now, the cache files are being generated/dumped to file system. All > good so far. But on a page refresh, it generates the cache files > again. And on another refresh, generates them again. > > Any ideas? I''m storing images, but I tested it with text and the text > file was overwritten on each refresh as well. > > Thanks, > Joe > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >