【发布时间】:2011-05-03 09:53:15
【问题描述】:
这个错误最初是在这里发布的:https://rails.lighthouseapp.com/projects/8994/tickets/5713-ruby-19-ku-incompatible-with-mem_cache_store 现在,由于我们遇到了同样的问题,我将在此处复制该问题中的一个问题,希望有人已经有了答案: Ruby 1.9 以 unicode 模式(-Ku)启动时,mem_cache_store.rb 解析失败:
/usr/local/ruby19/bin/ruby -Ku /usr/local/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/
activesupport-3.0.0/lib/active_support/cache/mem_cache_store.rb
/usr/local/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0/lib/active_support/
cache/mem_cache_store.rb:32: invalid multibyte escape: /[\x00-\x20%\x7F-\xFF]/
我们的情况实际上是相同的:当您将 config.action_controller.cache_store 设置为 :mem_cache_store,并尝试运行测试、控制台或服务器时,您会收到以下信息:
/Users/%username%/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.1/lib/active_support/
cache/mem_cache_store.rb:32: invalid multibyte escape: /[\x00-\x20%\x7F-\xFF]/
有什么办法可以避免这种情况吗?..
【问题讨论】:
标签: ruby caching ruby-on-rails-3 memcached ruby-1.9