Rails app moved to production server gives “dump format error for symbol” error

前端 未结 6 1117
粉色の甜心
粉色の甜心 2021-02-12 15:41

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 fi

相关标签:
6条回答
  • 2021-02-12 16:09

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

    0 讨论(0)
  • 2021-02-12 16:13

    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.

    0 讨论(0)
  • 2021-02-12 16:17

    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.

    0 讨论(0)
  • 2021-02-12 16:26

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

    0 讨论(0)
  • 2021-02-12 16:26

    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 讨论(0)
  • 2021-02-12 16:29

    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!

    0 讨论(0)
提交回复
热议问题