19

I've just moved my rails app from the development to deployment server. I've installed passenger, but I wanted to try with rails s to make sure all was running fine (this is the first time I develop and deploy a rails application).

Specs are: Ruby 1.9.3 with RVM, mod_passenger, Rails 3.2.3. All installed correctly and I've also enabled the Apache module. By the way something is going wrong (passenger keeps sayng "Error message: Unknown key: class".)

Running rails s is giving a weird error listed above dump format error for symbol(0x45)

Processing by Devise::SessionsController#new as HTML
  Rendered devise/_links.haml (2.2ms)
  Rendered devise/sessions/new.html.haml within layouts/application (11.8ms)
Completed 500 Internal Server Error in 110ms

ActionView::Template::Error (dump format error for symbol(0x45)):
    8:     / HTML5 shim, for IE6-8 support of HTML elements
    9:     /[if lt IE 9]
    10:       = javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
    11:     = stylesheet_link_tag "application", :media => "all"
    12:     /%link(href="images/favicon.ico" rel="shortcut icon")
    13:     /%link(href="images/apple-touch-icon.png" rel="apple-touch-icon")
    14:     /%link(href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon" sizes="72x72")
  app/views/layouts/application.html.haml:11:in `_app_views_layouts_application_html_haml__3524679841439843142_22055600'

What does it mean? Googling it seems a flash[] error but I can't really understand what should I do here.

Waiting for some suggestion, thank you!

6 Answers6

46

Had the same problem. Try removing your [app]/tmp dir. It seems to be trying to unmarshal some borked files.

Ponny
  • 703
  • 9
  • 17
  • This was it for me as well. I think it had to do with upgrading some of my gems. – mmrobins Jul 15 '12 at 04:07
  • 3
    This worked for me as well - after did 'replace all in files' in an editor. – Khiet Jul 19 '12 at 13:02
  • This error was also introduced to my app by using the "replace all in files" feature to change some variables. It tampered with files in the tmp/cache dir, creating this issue. – Steve Sep 11 '14 at 18:30
  • Similar to Steve I did a replace all and caused issues. My specific error code was (0x70). Clearing cookies as others suggested did not work. This answer worked for me although I believe I had to reboot as I encountered another error about one of my JS libraries not being found. – Douglas Drouillard Feb 09 '15 at 01:31
26

Change an asset from new.js to new.js.coffee and received this error when trying to render a view which was trying to render new.js:

ActionView::Template::Error (dump format error for symbol(0x6d))

I figured it was something related to the tmp files (thanks to the comments in this thread). I ran:

bundle exec rake tmp:clear

And I was good to go!

ryanjones
  • 5,383
  • 4
  • 28
  • 24
0

The problem here was that I inserted "haml-rails" under the :assets pipeline, so it was not able to find HAML on the production environment.

To be honest I'm surprised that just removing javascript_include_tag and stylesheet_link_tag it was still rendering the html.

By the way I fixed it by moving haml-rails out from the assets scope.

0

I ran into the same issue when I removed a bunch of unused .coffee files from my assets.

I resolved the issue by running:

bundle exec rake assets:precompile RAILS_ENV=<environment>

And then restarting the server.

Tag
  • 1
-1

This doesn't look like a passenger error, my guess would be a problem with your HAML. Try removing 8, 9, and 10, and see if it renders. If it does, that will let you narrow down the problem.

Allyl Isocyanate
  • 13,306
  • 17
  • 79
  • 130
  • I needed to remove all `javascript_include_tag` and `stylesheet_link_tag`. It works, but without any style or js (obviously). What's wrong here? –  May 12 '12 at 16:33
  • 1
    Try replacing if ie with the surround helper as per: http://stackoverflow.com/questions/9107681/ie-conditional-comments-in-haml – Allyl Isocyanate May 12 '12 at 22:04
-1

I had the same problem, and the fix was to run git clean -dfx

akjoshi
  • 15,374
  • 13
  • 103
  • 121
Jack Desert
  • 1,153
  • 10
  • 7