Skip to content
This repository has been archived by the owner on Apr 28, 2021. It is now read-only.

Asset precompile #26

Open
mfonolleda opened this issue May 25, 2016 · 1 comment
Open

Asset precompile #26

mfonolleda opened this issue May 25, 2016 · 1 comment

Comments

@mfonolleda
Copy link

Hi,

I've run into an issue when precompiling the assets of the catarse_pagarme engine in production on AWS. When precompiling, sprockets only picks up the application.js file which assumes is the manifest.

Is it possible that you are not seeing this issue on Heroku because you have config.assets.compile = true on the production environment?

In order to fix this (I'm sure there are other ways), I have used the same strategy as the Catarse app. I have moved all files in the folder app/assets/javascripts/catarse_pagarme into an app/ subfolder and renamed application.js to app.js. Next I have created an application.js file in app/assets/javascripts/catarse_pagarme where I require the app/ folder and include the code in app/assets/javascripts/catarse_pagarme.js. I have also removed catarse_pagarme.js file.

Finally, in the view app/views/catarse_pagarme/pagarme/review.html.slim I have replaced the catarse_pagarme javascript tag for catarse_pagarme/application.

Cheers,

MF

@devton
Copy link
Member

devton commented May 25, 2016

hello @mfonolleda can u send a PR wit these modifications?

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

No branches or pull requests

2 participants