user3597950
user3597950

Reputation: 10241

incompatible marshal file format (can't be read) format version 4.8 required; 0.0 given

I am getting the following error:

incompatible marshal file format (can't be read)
format version 4.8 required; 0.0 given

On this line:

  <%= stylesheet_link_tag "application", media: "all",

From this portion of my layouts file:

  <html>
    <head>
      <title><%= full_title(yield(:title)) %></title>
      <%= stylesheet_link_tag "application", media: "all",
                                             "data-turbolinks-track" => true %>
      <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
      <%= csrf_meta_tags %>

I have never encountered this problem before and the explanations online were either too advanced for me or were related to people making games, my project is a simple rails app that I just started yesterday.

Upvotes: 8

Views: 11386

Answers (4)

Aleksei Matiushkin
Aleksei Matiushkin

Reputation: 121010

Well, I’ll put it here just in case.

I had the similar problem after power outage on my dev machine. Refined solutions, listed around (explicit assets clearing and even removal of tmp/cache folder,) did not work for me.

What worked, was a hammer blow:

rm -rf $RAILS_ROOT/tmp

Make sure that $RAILS_ROOT is defined before doing this, or you will delete your root /tmp directory

Upvotes: 1

Kiryl Plyashkevich
Kiryl Plyashkevich

Reputation: 2277

Fix: change the secret key base to invalidate all sessions, especially after Rails upgrade.

Upvotes: 4

JanuskaE
JanuskaE

Reputation: 1304

I had to delete the sass and sprockets folders in rails_root/tmp/cache.

Upvotes: 3

kaspernj
kaspernj

Reputation: 1263

Have you tried clearing assets? bundle exec rake assets:clean

And then recompile: bundle exec rake assets:precompile

Are you somehow mixing up Ruby versions? Maybe you are precompiling with 1.9 and running Rails through Passenger or something with 2.0?

Upvotes: 6

Related Questions