Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Rack-cache key problems after moving to jruby+glassfish
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Expand all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
KD  
View profile  
 More options Aug 13, 11:58 am
From: KD <inbox...@gmail.com>
Date: Thu, 13 Aug 2009 08:58:58 -0700 (PDT)
Local: Thurs, Aug 13 2009 11:58 am
Subject: Rack-cache key problems after moving to jruby+glassfish
I have a Sinatra app I ported from plain old window ruby and mongrel
to jruby + glassfish.  Porting was almost entirely just installing the
new software (though I was using rest-client and it doesn't work at
all and rack-cache isn't working which is why I'm here).

It is working like a champ if I disable rack-cache.  If I enable it I
get exceptions in the write call and I think it is because for some
reason in the new environment rack-cache.cache_key is set wrong.  I
have key's that look like this: '://localhost/testpackage?'.    Seems
like that is the request.url, not the request.path_info, and maybe it
should be using request.path_info?

I see some code in the gem suggesting I can somehow set :cache_key.
How might I do this and where?

Thanks,
KD.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
KD  
View profile  
 More options Aug 13, 12:56 pm
From: KD <inbox...@gmail.com>
Date: Thu, 13 Aug 2009 09:56:08 -0700 (PDT)
Local: Thurs, Aug 13 2009 12:56 pm
Subject: Re: Rack-cache key problems after moving to jruby+glassfish
It appears the problem is that in jruby+glassfish under Windows,
IOError is thrown instead of ENOENT.  Since rack-cache expects this
exception and codes in the rescue of read/write/purge, these
operations will fail.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
KD  
View profile  
 More options Aug 13, 3:45 pm
From: KD <inbox...@gmail.com>
Date: Thu, 13 Aug 2009 12:45:04 -0700 (PDT)
Local: Thurs, Aug 13 2009 3:45 pm
Subject: Re: Rack-cache key problems after moving to jruby+glassfish
If directory foo does not exist, and you run the following on ruby
under windows and jruby under windows you get different exceptions:

path = 'C:/foo/bar'
begin
  File.open(path, 'wb') { |f| Marshal.dump('hello, foo', f) }
rescue IOError => err
   puts err.inspect # jruby does this
rescue Errno::ENOENT => err
   puts err.inspect # ruby does this
end


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google