我想在Windows上使用Rails 3.2尝试jruby 1.7.0.RC2。我能够启动服务器,但每次我尝试访问需要css(javascript_include_tag)的页面时,都会收到以下错误:
invalid encoding in marshaling stream: I"co
这是堆栈跟踪,如果它有帮助:
ActionView::Template::Error (invalid encoding in marshaling stream: I"◄co):
9: = stylesheet_link_tag "application", :media => "all"
app/views/layouts/application.html.haml:9:in `_app_views_layouts_application_h
tml_haml__357561048_13162'
Rendered C:/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/actionpack-3.2.8/lib/act
ion_dispatch/middleware/templates/rescues/_trace.erb (7.0ms)
Rendered C:/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/actionpack-3.2.8/lib/act
ion_dispatch/middleware/templates/rescues/_request_and_response.erb (6.0ms)
Rendered C:/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/actionpack-3.2.8/lib/act
ion_dispatch/middleware/templates/rescues/template_error.erb within rescues/layo
ut (41.0ms)
我的application.css只是默认资产管道的结果,没什么特别的。我甚至用一个空的application.css.scss文件得到了同样的错误...
Ruby MRI 1.9.2和1.9.3一切正常。
我必须说,在编码方面,我很无能为力。有什么想法吗?
答案 0 :(得分:1)
在项目根目录中运行rake tmp:clear
为我解决了这个问题。似乎jRuby不喜欢使用MRI Ruby的缓存文件。