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

Migrate from Sprockets to Propshaft #1537

Open
mpalenciano opened this issue Jan 11, 2025 · 0 comments
Open

Migrate from Sprockets to Propshaft #1537

mpalenciano opened this issue Jan 11, 2025 · 0 comments

Comments

@mpalenciano
Copy link

Hi there,

We have upgraded to Rails 8, and migrated from Sprockets to Propshaft for the assets, but now when we deploy to Heroku the task "assets:precompile" is run always, despite having config.assets.compile = false.

Looking to the code in your ruby buildpack the assets will not be compile if a (sprockets) 'manifest' file exits in 'public/assets/' dir.
Since we don't use Sprockets now we don't have a 'manifest' file anymore in our repo, that's the reson the assets compile run.

if Dir.glob("public/assets/{.sprockets-manifest-*.json,manifest-*.json}", File::FNM_DOTMATCH).any?

if Dir.glob("public/assets/{.sprockets-manifest-*.json,manifest-*.json}", File::FNM_DOTMATCH).any?
  puts "Detected manifest file, assuming assets were compiled locally"
  return true
end

Is there an alternative way to not run the assets using this buildpack? or will you adapt the code for when not using Sprockets? meanwhile the solution we found is writing a dummy/empty public/assets/manifest-heroku.json. But when running "assets:clobber" it gets deleted and we have to create it again.

Please, excuse me if I am wrong

Thank you and regards.

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