简体   繁体   中英

Windows - JRuby on Rails - ActionView::Template::Error invalid encoding

I want to try jruby 1.7.0.RC2 on Windows with Rails 3.2. 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:

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. I even get the same error with an empty application.css.scss file...

Everything works fine with Ruby MRI 1.9.2 and 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. It seems that jRuby does not like to use MRI Ruby's cached files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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