简体   繁体   中英

Rails asset pipeline hangs

I am running Rails 3.2 in the development environment. Somehow, I have gotten into a situation where any change to code while debugging hangs up in the asset pipeline while trying to deliver the new page. By hangs, I means it takes a very very long time which usually causes a timeout somewhere. At present I'm debugging some javascript so all of the assets are unchanged except for one JS file. There are no error messages I can see anywhere. When I use Chrome to look at network activity it is always hung on a pending delivery of application.js, which is where the js manifest lives.

The work around seems to be:

  • clear the cookies and cache on the browser
  • restart the app server
  • go to localhost:3000 to re-sign-in.

I have to do this every time I change a line of code in JS.

Clearly I am doing something wrong and this used to work fine. No new gems, so new workflow. I did not accidentally precompile assets to my knowledge.

Why would the pipeline hang delivering my custom JS (not bootstrap or angular)? Why in such a way that the work around works?

I notice several unresolved questions about this so if anyone has a clue it might help a few of us.

I just had the same experience. Deleting Rails' tmp folder seems to have solved it for now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM