- Newest
- Most votes
- Most comments
Hello there,
Hope you are doing well.
==========
From your response I’ve understood that Elastic Beanstalk is not able to compile ‘application.scss’. You have tried using ‘rails assets:precompile’ in your local environment and it works fine. But when you deploy using Beanstalk it is failing.
I tried to create a sample Beanstalk ruby application and found that Beanstalk runs the below command during deployment :
/bin/su webapp -c bundle exec /opt/elasticbeanstalk/config/private/checkforraketask.rb assets:precompile
Here I would like to tell you that you can skip this by setting the ‘RAILS_SKIP_ASSET_COMPILATION’ [1] to true. Then you can try compiling using ebextensions [2] or hooks [3] depending on the use case. You can specify your own command ‘rails assets:precompile’. You can go through this Instance deployment workflow [4] doc to understand how the deployment process works in Beanstalk.
If it is still failing then we would have to look at your environment logs [5] to investigate this issue further. Thus, currently due to the limited information available, I would suggest you to reach out to AWS Elastic Beanstalk Support team with a case efficient troubleshooting. Please share your logs, environment name, Application name, region when you create a case. We’ll be more than happy to assist you with this case.
I sincerely hope that you find the above information useful.
Have a safe and good day ahead.
====
References:
[1] https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Ruby.container.html [2] https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html [3] https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/platforms-linux-extend.hooks.html [4] https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/platforms-linux-extend.workflow.html [5] https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.logging.html
Relevant content
- Accepted Answerasked 3 years ago
- asked 4 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 2 months ago
Thank you for the recommendations. Unfortunately, the server still refuses to recognize the application.scss file even when executing rails assets:precompile instead. The precompile task will work if I explicitly add a scss file to the manifest or assets initializer config, but it won't process the scss syntax and just output the original content of the file, sass functions, directives, and all.