Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 499
user3597950 Avatar asked May 13 '14 11:05

user3597950


3 Answers

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?

like image 181
kaspernj Avatar answered Nov 10 '22 02:11

kaspernj


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

like image 22
Kiryl Plyashkevich Avatar answered Nov 10 '22 03:11

Kiryl Plyashkevich


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

like image 32
JanuskaE Avatar answered Nov 10 '22 03:11

JanuskaE