You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context. Ruby ruby-2.5.5, Rails 5.2.3, Sprockets 3.7.2, Sprockets-rails 3.2.1
Running a project with lots and lots of css and js assets.
Problem: When running with config.assets.debug = true I can load all the assets as the dependencies all load individually.
When I pre-compile assets so that they're in public/assets then I can run with config.assets.debug = false. But with config.assets.debug = false and no pre-compiled assets then it fails. The error from curl is
* transfer closed with 832716 bytes remaining to read
* stopped the pause stream!
* Closing connection 0
curl: (18) transfer closed with 832716 bytes remaining to read
And similar error in Chrome console.
But it does send back the size of the concatenated assets in the header. And then fails when it doesn't get that number of bytes. So somewhere in the code it's already got all the files together so it knows how many bytes it's going to send back.
I'm guessing that it might be because it tries to compile all the assets on first request, and because they're so big (it's not me, I'm taking over this project), it times out before it finishes. I've tried extending the wait time in Puma and Curl but it doesn't work.
I did find that if there are no dependencies in application.css.scss or if the dependencies have nothing in them then it'll return quickly. Any css in application.css.scss will be returned.
To debug this I need to checkout the gem and put some byebug statements in the code. But where would I start? I need to see what it's trying to return.
The text was updated successfully, but these errors were encountered:
Context. Ruby ruby-2.5.5, Rails 5.2.3, Sprockets 3.7.2, Sprockets-rails 3.2.1
Running a project with lots and lots of css and js assets.
Problem: When running with
config.assets.debug = true
I can load all the assets as the dependencies all load individually.When I pre-compile assets so that they're in
public/assets
then I can run withconfig.assets.debug = false
. But withconfig.assets.debug = false
and no pre-compiled assets then it fails. The error fromcurl
isAnd similar error in Chrome console.
But it does send back the size of the concatenated assets in the header. And then fails when it doesn't get that number of bytes. So somewhere in the code it's already got all the files together so it knows how many bytes it's going to send back.
I'm guessing that it might be because it tries to compile all the assets on first request, and because they're so big (it's not me, I'm taking over this project), it times out before it finishes. I've tried extending the wait time in Puma and Curl but it doesn't work.
I did find that if there are no dependencies in
application.css.scss
or if the dependencies have nothing in them then it'll return quickly. Any css inapplication.css.scss
will be returned.To debug this I need to checkout the gem and put some byebug statements in the code. But where would I start? I need to see what it's trying to return.
The text was updated successfully, but these errors were encountered: