密钥中的内存缓存错误非法字符(Ruby 1.8.7 / Rails 2.3.9)
|
我的一个Rails应用程序中出现以下错误[Ruby 1.8.7 + Rails 2.3.9]
A ArgumentError occurred in home#dashboard:
illegal character in key \"dashboard_prod:views/reports/1050 - 097\"
/opt/ruby-enterprise/lib/ruby/gems/1.8/gems/activesupport-2.3.9/lib/active_support/vendor/memcache-client-1.7.4/memcache.rb:643:in `get_server_for_key\'
我在Google上搜索,发现在http://www.coffeepowered.net/page/2/上也有类似的问题。
在该页面上提到,这应该起作用:
class ActionController::Caching::Actions::ActionCachePath
def path
@cached_path ||= Digest::SHA1.hexdigest(@path)
end
end
但是我不确定应该在哪里输入。所以我有两个问题:
如何解决眼前的问题
我应该在哪里重写上面的代码,在哪里重写某些标准类或Gem中定义的类。
任何帮助,将不胜感激。
没有找到相关结果
已邀请:
1 个回复
呕蹿尉