similar to: cache_page throwing "undefined method merge" error

Displaying 20 results from an estimated 2000 matches similar to: "cache_page throwing "undefined method merge" error"

2006 Mar 22
0
page caching
I''m trying to use the following methods (extract): expire_page :controller => "site", :action => "funding" cache_page :controller => "site", :action => "welcome" to rebuild my entire site cache from an admin page, but I can''t seem to get the cache_page function to work. looking at the docs there seem to be 2 versions of
2008 Sep 24
3
caches_page :if not executing (but caches_action :if) does
Hi folks - Seeing a weird problem and would love some help. It''s documented in http://pastie.org/278310 to be more readable. In short, I have a caches_page "action", :if => {stuff} but the :if is never being called - the action is just caching every time. (If I put a debugger call in the :if block, it never stops.) If I replace caches_page with caches_action, the if
2005 Mar 16
6
caches_page problem
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
2005 Apr 27
3
caches_page questions
I''m attempting to use caches_page to speed up the loading of certain pages on my site, and have run into a couple questions: 1) The site has ''states'' (as in U.S. states), so I have a State model and a States controller. Going to http://sitename/states/ routes you to the States controller, ''index'' action. The States controller looks like so: class
2006 Feb 20
3
Rewriting with an after_filter
All - I''m completely new to RoR and also new to programming in an MVC structure... The Pragmatic Programmers guide to Rails says, temptingly: "After filters can be used to modify the outbound response, changing the headers and content if required. Some applications use this technique to perform global replacements in the content generated by the controller?s templates (for
2006 Jul 10
2
Mongrel caching
I am using mongrel to serve static as well as dynamic pages. The static page''s controller contains the following line of code: after_filter {|c| c.cache_page} This code caches that page as a static html page that does not have to be rendered form multiple files (the view and layout). I got the idea to do this form the rails recipes book. It definitely cached the pages. Wen I make
2006 Aug 19
1
caches_page does not follow url path
I am using lighttpd. I have a controller (headlines) with a caches_page :index. When invoked via http://0.0.0.0:3000/headlines/ I find a index.html cached in the public folder. The server did not create a headlines folder and place the cached index page within the controller directory as expected. Is there a configuration detail I need to change?
2006 Aug 22
1
Why the caches_page can not work?
Hi,I want the page to be cached and be accessed by all users.And in my controller: class MyController < ApplicationController caches_page :show def show render :layout => false end end When I use link_to_remote to use My/show to update some div, i can not see the template has been cached. However,If I use <%= render_component :controller => ''My'',
2006 Feb 16
10
Ruby class variables and access from view templates
I have an app that requires me to define a class variable (actually an array) in a controller and then access it from within a view. It seems that the class variables aren''t working right. Here is an example of what I''m trying to do. class DisplayController < ApplicationController @@thumbnail_array = Array.new ... def some_method @@thumbnail_array = SomeModel.find_all
2005 Dec 18
0
Caching question
I''ve got caching mostly working but it''s acting string with the index/home. On the site I have a redirect the points http://nutritionreality.com at http://nutritionreality.com/home I do this in routes.rb by: map.index '''', :controller => ''home'', :action => ''index'' Caching happens on index (index.html gets created in
2006 Feb 07
1
Page caching when name contains a dot (period)
Hi Everyone, Just thought I''d post some details of an interesting little quirk I''ve found with page caching. For a site I''ve just built for a small music festival, there are a number of artist profiles. I''m storing the artists in my database, but using caches_page to speed things up when displaying the details to the public. I''ve also made it so
2006 Mar 27
0
render_to_string troubles
Hi, I''m trying to build a simple mechanism for pre-caching a bunch of files by iterating over a hash of options from within a controller: #site.controller: for options in [ { :controller => "site", :action => "welcome" }, { :controller => "site", :action => "about" }, { :controller => "site", :action
2006 Feb 04
4
Page caching feeds and cache file extensions
I have a feeds controller which generates RSS and Atom pages. I put ''caches_page :show'' in it. The problem is that the pages are saved with an html extension. As a result, browsers display the cached feeds as HTML rather than XML, and feed validators complain. There''s an option to set ''Base.page_cache_extension'' globally, but I don''t want
2006 Jun 14
1
page caching with custom routes
hi , I''m having problems with expire_page with custom routes i''ll show some code blog_controller --------------- def clear_cache_rss_artikels expire_page url_for(:controller => "xml",:action => "rss_artikels") end this is called when a new article is posted or edited or destroyed xml_controller --------------- class XmlController <
2006 Oct 12
2
HowTo autogenerate a cahced page that was deleted
Hi I am using "caches_page :index" to cache a page. I delete this file via a cron tab command every 1 hour. However, right after the file is deleted the very next user experiences a huge delay because the page is being generated. Is there anyway to autogenerate the file before the very next user requests the page? A unix or ruby solution would do. thanks, -- nueromancer -- Posted
2006 May 17
2
Caching doesn''t work at all...
Installed RoR under lighttpd and noticed that caching some actions didn''t accelerate page serving. The following little example of class TestscriptController < ApplicationController caches_page :index def index @string = Time.now.to_s end end and <html> <head> <title>Test</title> </head> <body> <p>Test</p> <p><%=
2010 Nov 12
1
Dashboard throwing undefined method `to_time' for nil:NilClass error on page view
Using 1.0.4 release on Solaris 10 with Ruby 1.8.7. Starting the server in production mode works fine until I request a page from the web browser then I get the following errors on the console. I''m running as user puppet (have also tried as user root but same output). All files are owned by user/group puppet/puppet. I have dropped and recreated the database multiple times just to see if
2005 Nov 15
1
acts_as_paranoid --> undefined method `constrain' for class `Class'
Hi All, So I thought I had this acts_as_paranoid problem previously and fixed by going to rails 0.14.2, although I''m not 100% it was the same thing. I''m now on rails 0.14.3 and I''m getting: undefined method `constrain'' for class `Class'' for any model that includes acts_as_paranoid. My application trace is below. Has anyone else got this and know a
2007 Apr 09
2
Errno::EACCES in Controller / Permission denied
Hello, I did a seemingly smooth install of ferret, but when I try to add it to my model, I get an error. My info: My rails site: shelikes (a restaurant review site) My controller: Display My model: Review My only line of code added for ferret is: class Review < ActiveRecord::Base acts_as_ferret ...( more stuff not related )... end Below is the error information. Any thoughts on how
2007 May 07
1
Mongrel and EBADF error consuming resources
In the last few weeks I''ve noticed the load average spiking up for 5 minutes at a time (2-3.5 on a system that usually runs around 0.5-1.5). Looking closer I found that one mongrel process and litespeed are at the top, and using strace I''ve found that they''re passing the file below, seems to get stuck on single file/EBADF error. It happens with a number of different