-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception on Ruby 1.9.3 #1
Comments
Got the same error. |
I'm getting this too, and @MQT's change fixes it for me |
I too have same error with ruby 1.9.2 |
I get a similar error with ruby 1.9.2: undefined method `value' for "---\n- views/my_key\n":String and it goes away when I clear the cache. Can someone explain how I get @MQT's fix? Do I have to pull the gem from somewhere else or download the code into the vendors dir and change it there? |
You have to use the gem from my repo. But the fix is old and I don't really know what I did there. Wouldn't use that code on a production system.. I switched from memcached to redis then, which supports listing of keys and works much nicer. (I got some other issues with memcached and keys not being invalidated). |
Oh. Thanks for the advice, I'll look into Redis. Thanks,
On Dec 21, 2012, at 5:15 PM, mqt [email protected] wrote:
|
Thanks again, @MQT, for the advice. I'm using Redis now and it seems to work. For anyone else running into this, the use of Redis needs to be tweaked when using it as the cache_store. First of all, you must load the 'redis-rails' gem as well as the 'redis' gem. Then you must deal with the fact that Redis matches keys by a simplified wildcard notation rather than ruby Regexp. I found the details here: http://dev.mensfeld.pl/2012/06/rails-3-2-redis-store-views-caching-and-expire_fragment-with-regexp/ But in my case I preferred to just fix my sweeper so that it uses redis wild-cards instead of adding the code shown in the link above to convert Regexp to redis wild-card keys. So all I did was fix the fragment string designations in my sweeper to use wildcards and add this to my redis.rb initializer to force redis to delete all matching keys when given a string: module ActiveSupport
module Cache
class RedisStore < Store
def delete(key, options)
delete_matched(key, options)
end
end
end
end |
fix issue defconomicron#1
On Ruby 1.9.3 got following exception:
NoMethodError (undefined method `value' for #String:0x00000004326848)
I don't know why exactly but this seems to fix it (I guess it will break it for Ruby 1.8):
nd2s@dd0b5ee
The text was updated successfully, but these errors were encountered: