Anyone having Warble working with Rails cache sweepers?

Hi all,

I’ve got finally my Rails app almost working on Glassfish with Warble.
I had good stuff working: static page cache, JNDI connection
pooling… And the overall performance looks great.

BUT, I can’t have my cache sweepers be properly loaded!

I did it exaclty that way:
http://www.railsenvy.com/2007/2/28/rails-caching-tutorial#sweepers
and always had it working with Mongrel.
But with Warble and Glassfish (and Tomcat as well at least), all I’m
getting is that kind of error then:

MyNiceConcroller has no method ‘cache_sweeper’

that’s because my sweepers are not loaded, no matter my
config.load_paths += %W( #{RAILS_ROOT}/app/sweepers ) instruction in
environment.rb

I tried a variety of tricks like load ‘path_to_my_cache_sweeper’
inside my MyNiceController class, but then got bugs like:
uninitialized constant ActionController::Caching::Sweeper

So my question is: anyone got Rails cache sweepers working with
Warble? If yes how please?

Thanks in advance, I’m nearly online with Livetribune.com.

Raphaël Valyi.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

I think this is a problem with JRuby-Rack 0.9. Can you try dropping in
this snapshot of JRuby-Rack instead?

http://caldersphere.net/jruby-rack/jruby-rack-0.9.1-SNAPSHOT.jar

/Nick

On Sun, Jul 13, 2008 at 3:04 PM, Raphaël Valyi [email protected] wrote:

and always had it working with Mongrel.
inside my MyNiceController class, but then got bugs like:
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Than you Nick, that new version worked like a charm. My unmodified
cache sweepers were loaded properly!

By the way, if that helps, before using that new JRuby Rack version, I
worked arround the loading problem by adding this at the beginning of
each cache sweeper:
require “rubygems”
require “active_record”
require
‘…/vendor/rails/actionpack/lib/action_controller/caching/sweeping.rb’

But now you don’t even need that.
God, my JRuby on app is finally nearly online; last tests and I’ll
speak a bit about it.

Raphaël Valyi.

On Mon, Jul 14, 2008 at 5:15 AM, Nick S. [email protected]
wrote:

I’ve got finally my Rails app almost working on Glassfish with Warble.

So my question is: anyone got Rails cache sweepers working with


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Raphael,

It’s good to know that GlassFish gives you “great performance” :slight_smile: Any
successful deployment of GlassFish can be easily featured on
http://blogs.sun.com/stories.

I’m certainly looking forward to details.

-Arun

Raphaël Valyi wrote:

But now you don’t even need that.

http://caldersphere.net/jruby-rack/jruby-rack-0.9.1-SNAPSHOT.jar

BUT, I can’t have my cache sweepers be properly loaded!
config.load_paths += %W( #{RAILS_ROOT}/app/sweepers ) instruction in

To unsubscribe from this list, please visit:


Application Platform, Sun Microsystems, Inc.
Blog: http://blogs.sun.com/arungupta


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Mon, Jul 14, 2008 at 6:17 PM, Raphaël Valyi [email protected] wrote:

But now you don’t even need that.
God, my JRuby on app is finally nearly online; last tests and I’ll
speak a bit about it.

My best compliments for your job!
Hope to see a nice tutorial explaining all the steps
to reach a similar result like yours soon :wink:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs