rails/rails — Issue #3839: Precompiled assets cause ruby to crash on development mode
Author: jpon91
Created: 2011-12-03 03:30:57+00:00
State: open

Whenever you precompile your assets using the rake assets:precompile command, assets are compiled to public/assets directory, and when working in production environment everything works ok, but when running rails server in dvelopment mode, if you refresh the page a few times you will get a Ruby interpreter(CUI) 1.9.2p180 [i386-mingw32] has stopped working error message and the server will crash, i do not know why this happens, but if you delete the public/assets directory the problem disapears. If the public/assets folder exists each time you reload the page the asset pipeline gives a 304 not modified message but after the third or fourth time the server will crash after giving two or three of the the precompiled files 304 message, meaning it crashed in the middle of serving a 304 message, or validating that the file had not change, a solution to this problem is setting <%= stylesheet_link_tag "application", :debug => false %> and <%= javascript_include_tag "application", :debug => false %> indicating that debug mode is not used, this way the asset pipeline will only serve the files cancatenating them, and will not check for changes in them. This is probably a bug in sprockets method of serving assets and validating their current state. Anxious to hear a response on this topic