With sprockets 4.0, there needs to be a way to differentiate between assets that need to be loaded in distinct rails environments. May there is a way to do this, but I haven't found it yet.
spec.js and spec.css are required for rspec to run automated tests against our application. However, these files are not seen by sprockets 4.0 when I try to deploy on AWS using OpsWorks.
Actual behavior
If I put those two files into the manifest.js file, the deployment breaks. If I leave those two files out of the manifest.js, my rspec tests will not run.
Tell us what happens instead
When running rspec without the two files in the manifest.js:
Failure/Error: = stylesheet_link_tag 'spec', media: 'all' if Rails.env.test?
ActionView::Template::Error:
Asset `spec.css` was not declared to be precompiled in production.
Declare links to your assets in `app/assets/config/manifest.js`.
When deploying on OpsWorks with the two files in manifest.js:
I won't be able to set up an OpsWorks deployment on codetriage.com.
The problem is simple. How can I have assets compiled in when needed in development and test, and not be compiled for production.
Expected behavior
With sprockets 4.0, there needs to be a way to differentiate between assets that need to be loaded in distinct rails environments. May there is a way to do this, but I haven't found it yet.
spec.js and spec.css are required for rspec to run automated tests against our application. However, these files are not seen by sprockets 4.0 when I try to deploy on AWS using OpsWorks.
Actual behavior
If I put those two files into the manifest.js file, the deployment breaks. If I leave those two files out of the manifest.js, my rspec tests will not run.
Tell us what happens instead
When running rspec without the two files in the manifest.js:
When deploying on OpsWorks with the two files in manifest.js:
System configuration
Example App (Reproduction) - THIS IS IMPORTANT YOUR ISSUE LIKELY WILL NOT BE RESOLVED WITHOUT THIS
Please provide an example app
I won't be able to set up an OpsWorks deployment on codetriage.com. The problem is simple. How can I have assets compiled in when needed in development and test, and not be compiled for production.