简体   繁体   English

Windows-JRuby on Rails-ActionView :: Template :: Error无效编码

[英]Windows - JRuby on Rails - ActionView::Template::Error invalid encoding

I want to try jruby 1.7.0.RC2 on Windows with Rails 3.2. 我想在带有Rails 3.2的Windows上尝试jruby 1.7.0.RC2。 I'm able to start the server, but each time I try to access a page that requires a css (javascript_include_tag), I get the following error: 我能够启动服务器,但是每次尝试访问需要css(javascript_include_tag)的页面时,都会出现以下错误:

invalid encoding in marshaling stream: I"co

Here is the stack trace, if it helps: 这是堆栈跟踪,如果有帮助的话:

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)

My application.css is only the result of the default asset pipeline, nothing fancy. 我的application.css仅是默认资产管道的结果,没有任何幻想。 I even get the same error with an empty application.css.scss file... 我什至在使用空的application.css.scss文件时也遇到相同的错误...

Everything works fine with Ruby MRI 1.9.2 and 1.9.3. Ruby MRI 1.9.2和1.9.3一切正常。

I must say that when it comes to encoding, I'm clueless. 我必须说,在编码方面,我一无所知。 Any idea? 任何想法?

Running rake tmp:clear in the project root dir fixed this issue for me. 在项目根目录中运行rake tmp:clear为我解决此问题。 It seems that jRuby does not like to use MRI Ruby's cached files. 看来jRuby不喜欢使用MRI Ruby的缓存文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM