similar to: Easy question: Where do I put sweepers?

Displaying 20 results from an estimated 1000 matches similar to: "Easy question: Where do I put sweepers?"

2006 Jan 03
5
Are cache sweepers used?
After drawing many virtual blank stares in the IRC channel and finding zero results on the wiki for ''sweeper'' I''m left to wonder whether these are actually officially supported, or are on their way toward being deprecated. Is there a better way of expiring caches on model saves and deletions? Sincerely, Tom Lieber tom@alltom.com http://AllTom.com/
2006 Jun 26
4
Migrations and svn branches...
We are currently doing some development on a variety of branches that each have their own set of migrations (gee, database changes on a branch? how novel). The problem is with this strictly linear numbering of the migrations and these alternate branches. Let''s suppose I have branches/foo that adds two migrations 024_add_foo.rb and 025_refine_foo.rb and then another branches/bar
2005 Dec 28
6
coverage does not work
Hi, I''ve installed coverage (gem install coverage) and try to run tests with -rcoverage option on, but following error occurs: ruby: No such file to load -- coverage (LoadError) I try: ruby -rcoverage mytest.rb 1. I have rubygems in evn var RUBYOPT 2. Gem seems to be installed properly (I can read doc via gems, the files exist in the ../gem/... dirs) Does anyone know what is the
2006 Apr 08
2
Does anybody know what what is causing this console message?
This started, I think, after I upgraded to 1.1. trunk 508 $ruby script/console Loading development environment. /usr/local/lib/ruby/1.8/test/unit/assertions.rb:265: warning: already initialized constant UncaughtThrow >> Everything seems to work in the console, however. Keith -- Posted via http://www.ruby-forum.com/.
2006 Apr 12
2
RedCloth versus BlueCloth efficiency
Has anyone profiled the performance of RedCloth versus BlueCloth? I''m starting to realise that RedCloth is a more mature ruby project, although Markdown the syntax maybe more widespread than Textilize. Apart from the syntax, does anyone feel they have a preference, in terms of performance or number of outstanding bugs? Many thanks in advance. CHEERS> SAM
2006 Jul 14
5
migration and inserting default data
Hi, I''m wondering is there a way to load default data in the migration script? So, for example I''m creating new table to store the order status, I also want to pre-populate the table with some data from a sql file. I have done a quick search on the list but cannot find anything. thanks, - reynard -------------- next part -------------- An HTML attachment was scrubbed... URL:
2007 Apr 10
10
Could eBay be built with Rails?
My friend and I (both new to RoR) were having a discussion today about whether or not you could build an exact replica of eBay using on Ruby on Rails. I think that it could in fact be done, or at least a very close model of the same concept. My friend seems to think that maybe in fact, it could not be done. What are your thoughts? Could an eBay clone be built using only Ruby on Rails? What do you
2006 Jul 12
3
Ajax, the Back button, and Sweepers
I''m working on an app that''s basically forms and that makes fairly heavy use of Ajax. As a result of the Ajax usage, if the visitor uses the back button they get the page as it was originally loaded, not as they left it. I''ve looked at the Sweeper documentation and can not tell for sure that it''ll do what I want, which is to force an unconditional reload from
2008 Apr 01
1
"Undefined method merge" when using sweeper
Hi, I''m trying to use sweepers for the first time and got a problem - I get "undefined method `merge'' for "/signature/ f2d7c7c66450b169.html":String". The "/signature/f2d7c7c66450b169.html" part of the error message is the cached page. Here''s my sweeper: class FooSweeper < ActionController::Caching::Sweeper observe Foo def
2006 Apr 25
2
School Years/Teams listing problem
People, I have tables years and teams and I have the years listing like: 1965 1966 1967 . . I want to be able to click on the year and ONLY list teams for that year. At first I thought the following was working until I started populating the table with teams for more than one year. For views/years/list.rhtml: <% for year in @years %> <tr> <td> <%= link_to
2005 Apr 25
1
Problems when using sweepers with postbacks
I''m using a cache sweeper class [1] to take care of some pretty complex sweeping. However, there is a problem with the current implementation. Namely, the sweeper gets called only when an action named in cache_sweeper is called using GET. As many methods where sweeper would be useful are using postback to send the form to the same action, this causes the cache to get swept when
2006 Jul 23
18
help with "rake db:migrate" error please?
Hi, Just trying to get my first database based rails app up on dreamhost.com. The app was working prior to putting in mysql DB usage but I''m just stuck on getting the app working with mysql. I''ve already created the database and can connect to it manually. Below is the error I get after running the rake migrate. It worked OK on my home PC environment. I did change the
2006 Apr 02
2
Blank image for non-existant image URLs
Morning/Afternoon/Evening All, Just wondering if anyone has any suggestions on forwarding requests to invalid images (ie images that result in a 404 error) via routes.rb or a similar method? If possible I would like it to be based on the url so I can have different blank pictures for different directories (ie /images/people/user_id.jpg => /images/people/blank.jpg and
2006 Apr 11
2
Passwords in SVN?
Hi everyone, Where do you all keep your passwords for your apps? Out Subversion repo is locked down to authorized users, and only those users can see code in Trac. Is it safe to store passwords in there? For Rails? For other scripts? What''s your strategy for this? Thanks! Sean
2006 Apr 24
2
Session problem?
I have three apps that I run from the same menu html page. On occasion, after a reboot for example, I show the menu page and run one of the apps. I don''t use the other two apps at all. Much later (hours or days) I click on one of the other two apps and I get the Application error Rails application failed to start properly" No log messages in the app''s
2006 Sep 06
1
Changing Scaffold
Hi, I am starting a project in rails and I wish to change scaffolding. I''ve already done some changes like prepare all texts for locale. Now I am wishing to change the way it generates the _form partial. Could someone give some guideline so I can study such thing? I saw "template_for_inclusion" in form.rhtml but couldn''t find out how to change it. Being more
2006 Mar 22
1
How to go DRY?
We are creating a website for creating and maintaining communities. When members of a community are listed, we show their summary in a TABLE. So we have written a _member.rhtml partial to show this summary for that member. To show the memberlist we do render :partial => member, :collection => @members Now the problem is the row displayed for every member by the _member partial, may differ
2007 Feb 14
4
cache sweeper not getting called
Hi, I''ve started to implement page caches but I''ve hit a brick wall getting a sweeper to clear the cache when needed. It seems that any models that I tell it to observe aren''t being observed properly. If I add the sweeper to a controller the initialize method runs, but no matter what I do the after_save/after_update callbacks aren''t running. Also if I try to
2006 Jun 06
5
ruby mathematical expression parser
Hi, Has anyone come across a Ruby mathematical expression parser, capable of parsing out token, replacing them with values then executing the mathematical formula? Nothing too heavy, A * (44/12) * ... etc. where A is can be replaced with a value. In Java there are serveral, like JEP, but I''d prefer it we could get a Ruby one now we have moved over to Rails, otherwise we will have to
2007 Oct 21
4
Making 'expire_fragment' available to a model?
I noticed a lot of repetition across different Sweeper models in my app expiring the same fragments and so have been trying to move all the expire_fragment calls into another model which the sweepers can then use but it''s not working as I''d hoped.. I''ve created a CacheDestroyer model and want to be able to call something to the effect of: