Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

couldn't find file ... with type 'application/javascript' when using *.js.jst.ejs.slim #497

Closed
stiller-leser opened this issue Sep 7, 2017 · 1 comment

Comments

@stiller-leser
Copy link

stiller-leser commented Sep 7, 2017

Expected behavior

It should find and load the file (works fine in Sprockets 3)

Actual behavior

Instead it throws Sprockets::FileNotFound: couldn't find file... with type 'application/javascript'

System configuration

  • Sprockets version: 4.0.0.beta5
  • Ruby version: 2.3.0

Additional Information

If I do a Rails.application.assets.find_asset!('*.js.jst.ejs.slim') it returns:

#<Sprockets::Asset:3fe5365d1f28 "file:///path/to/file/file_name.js.jst.ejs.slim?type=text/slim&id=ecf6b827b96529b096b11377d14aa880b60a9fca5a49b0ea04d42b4b4933011d">

If I curl the file I can still see slim-syntax in there, so either the slim gem does not pick the files up, or if the syntax is supposed to be in there, the 'application/javascript' returned by sprockets is wrong.

How sprockets 3 behaves

If I curl the files using sprockets 3.7.1 the slim syntax is still present, but the file is correctly identified as 'application/javascript' and not 'text/slim'. Hence, this issue is related to #475 and could be fixed by adding to PR #491 .

@stiller-leser
Copy link
Author

This issue can be closed. It turned out to be a issue with the gem, rather than with sprockets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant