-
Notifications
You must be signed in to change notification settings - Fork 247
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
"Expected to find a manifest file" error with assets disabled #444
Comments
The proper way to fix this is stop using |
This is not a good option for us; we need all the default Rails components other than Sprockets, and to have to update our |
The way Rails let you opt-out components is by requiring individual railties. Railties are added once a year, you don't need a lot of work to add require statements once a year. There is no other option, sorry. |
If preventing |
That is for disabling compilation of assets. That doesn't disable the sprockets-rails to be loaded or executed. |
Just curious, the path is sprockets 3.2.1, why is |
sprockets is different of sprockets-rails. The path is sprockets-rails-3.2.1 |
I have this error just because I need to |
Per sprockets issue: rails/sprockets-rails#444
How do you solve this error? |
I could solve it by running: mkdir -p app/assets/config && echo '{}' > app/assets/config/manifest.js |
…ifest.js` (Sprockets::Railtie::ManifestNeededError) ref: rails/sprockets-rails#444
* Bump loofah from 2.2.3 to 2.3.1 Bumps [loofah](https://github.com/flavorjones/loofah) from 2.2.3 to 2.3.1. - [Release notes](https://github.com/flavorjones/loofah/releases) - [Changelog](https://github.com/flavorjones/loofah/blob/master/CHANGELOG.md) - [Commits](flavorjones/loofah@v2.2.3...v2.3.1) Signed-off-by: dependabot[bot] <support@github.com> * Fix error: Expected to find a manifest file in `app/assets/config/manifest.js` (Sprockets::Railtie::ManifestNeededError) ref: rails/sprockets-rails#444
mkdir -p app/assets/config && echo '{}' > app/assets/config/manifest.js rails/sprockets-rails#444 (comment)
# This is the 1st commit message: upgrade gems to fix CVEs with loofa # The commit message #2 will be skipped: # fix build error # # mkdir -p app/assets/config && echo '{}' > app/assets/config/manifest.js # # rails/sprockets-rails#444 # # new file: app/assets/config/manifest.js # This is the commit message #3: fix sprocket 4 and sass -> rails-sassc modified: Gemfile modified: Gemfile.lock modified: app/assets/config/manifest.js modified: config/initializers/assets.rb
…4.2 by default does require 'rails/all'
* bind sprockets to v3.7.2 because of rails/sprockets-rails#444, rails 4.2 by default does require 'rails/all' * add ruby 2.5 and 2.6
I had to pin an API only rails app to sprockets less than 4. Despite not requiring sprockets in application.rb it was still somehow being loaded and causing an error. |
Got bitten by this one more time today. |
See rails/sprockets-rails#444. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Later versions of sprokets which are included with rails require setting up a manifest file for assets See: rails/sprockets-rails#444
Later versions of sprokets which are included with rails require setting up a manifest file for assets See: rails/sprockets-rails#444
Later versions of sprokets which are included with rails require setting up a manifest file for assets See: rails/sprockets-rails#444
Later versions of sprokets which are included with rails require setting up a manifest file for assets See: rails/sprockets-rails#444
Later versions of sprokets which are included with rails require setting up a manifest file for assets See: rails/sprockets-rails#444
Faced the same issue with API only app with rails(v 6.0.3.3), ruby(v 2.7.1). Required to do both of the following,
|
Just doing this worked for my API only app |
sorry for another "me too", but I'm really confused why this happens even for a rails app that doesn't use sprockets any more. We:
Normally rails runs fine, but when we run, e.g. I understand the workaround with an empty json file, but this still means that some process is running / checking this file, when it shouldn't if sprockets is disabled. Right? EDIT: it seems to happen after we upgraded rails. So even though we don't have sprockets/sprockets-rails in our Gemfile, it's installed as a dependency, and then we get this issue because there's no manifest.json file. Using the workaround seems ok for now, but rather strange. |
Updating Rails to v6.1.0 causes sprockets to be updated to v4.0.2 as a dependency. That version expects app/assets/config/manifest.js to be present, which it is not since switching to webpacker. This causes an error and prevents the server starting. This commit adds sprockets to the gemfile and pins it as < v4.0 to prevent any unexpected updates in future. See rails/sprockets-rails#444 for discussion of the issue.
I know this is closed but I found kind of the issue at least for me ( I was upgrading from 5.2 to 6.0 and swap into webpacker) ! After digging into it it was related with sassc rails. It is using sprockets under the hood My approach:
Maybe it works for some of you :) |
Updating Rails to v6.1.0 causes sprockets to be updated to v4.0.2 as a dependency. That version expects app/assets/config/manifest.js to be present, which it is not since switching to webpacker. This causes an error and prevents the server starting. This commit adds sprockets to the gemfile and pins it as < v4.0 to prevent any unexpected updates in future. See rails/sprockets-rails#444 for discussion of the issue.
Updating Rails to v6.1.0 causes sprockets to be updated to v4.0.2 as a dependency. That version expects app/assets/config/manifest.js to be present, which it is not since switching to webpacker. This causes an error and prevents the server starting. This commit adds sprockets to the gemfile and pins it as < v4.0 to prevent any unexpected updates in future. See rails/sprockets-rails#444 for discussion of the issue.
…iltie' in config/application.rb rails/sprockets-rails#444
Updating Rails to v6.1.0 causes sprockets to be updated to v4.0.2 as a dependency. That version expects app/assets/config/manifest.js to be present, which it is not since switching to webpacker. This causes an error and prevents the server starting. This commit adds sprockets to the gemfile and pins it as < v4.0 to prevent any unexpected updates in future. See rails/sprockets-rails#444 for discussion of the issue.
Hi, can anyone tell me if the manifest.js file link is hard coded in sprockets, or it can be changed to a different location? |
Updating Rails to v6.1.0 causes sprockets to be updated to v4.0.2 as a dependency. That version expects app/assets/config/manifest.js to be present, which it is not since switching to webpacker. This causes an error and prevents the server starting. This commit adds sprockets to the gemfile and pins it as < v4.0 to prevent any unexpected updates in future. See rails/sprockets-rails#444 for discussion of the issue.
Updating Rails to v6.1.0 causes sprockets to be updated to v4.0.2 as a dependency. That version expects app/assets/config/manifest.js to be present, which it is not since switching to webpacker. This causes an error and prevents the server starting. This commit adds sprockets to the gemfile and pins it as < v4.0 to prevent any unexpected updates in future. See rails/sprockets-rails#444 for discussion of the issue.
Updating Rails to v6.1.0 causes sprockets to be updated to v4.0.2 as a dependency. That version expects app/assets/config/manifest.js to be present, which it is not since switching to webpacker. This causes an error and prevents the server starting. This commit adds sprockets to the gemfile and pins it as < v4.0 to prevent any unexpected updates in future. See rails/sprockets-rails#444 for discussion of the issue.
This monkeypatch will allow the behavior to be changed (perhaps introducing other problems ... use only after thinking about the tradeoffs):
|
acts_as_tenant v1.0.0 bumps sprockets to v4. In v4, there are some changes to how sprockets bundle assets, and they require a `manifest.js` to tell sprockets how to bundle the app's assets. We are not bundling assets, but for some reasons, sprockets has no way of opting out of this. See rails/sprockets-rails#444
acts_as_tenant v1.0.0 bumps sprockets to v4. In v4, there are some changes to how sprockets bundle assets, and they require a `manifest.js` to tell sprockets how to bundle the app's assets. We are not bundling assets, but for some reasons, sprockets has no way of opting out of this. See rails/sprockets-rails#444
acts_as_tenant v1.0.0 bumps sprockets to v4. In v4, there are some changes to how sprockets bundle assets, and they require a `manifest.js` to tell sprockets how to bundle the app's assets. We are not bundling assets, but for some reasons, sprockets has no way of opting out of this. See rails/sprockets-rails#444
With the release of Sprockets 4.0 and the requirement of a
manifest.js
file, we're seeing an error similar to #443 withsprockets-rails
3.2.1 where our test suite is producing this error:We load the standard
require 'rails/all'
in our test suite (which loads sprockets 4.0 by default), but we have no interest in using Sprockets or the asset pipeline within it.If we disable Sprockets with
config.assets.enabled = false
in our application, we expect that we shouldn't need to have amanifest.js
file. However, merely havingrequire 'sprockets/railtie'
anywhere in your application will force this check to occur unconditionally, regardless of if you've disabled the the application pipeline:https://github.com/rails/sprockets-rails/blob/v3.2.1/lib/sprockets/railtie.rb#L103-L110
I would suggest changing this check to be based conditionally on whether assets are enabled or not, so users are not forced to completely remove
sprocket-rails
to disable it.The text was updated successfully, but these errors were encountered: