comfy-blog icon indicating copy to clipboard operation
comfy-blog copied to clipboard

`rails test` results in sprockets error

Open morgant opened this issue 6 years ago • 1 comments

Note: For general questions and feature requests please leave a message on Gitter: https://gitter.im/comfy/comfortable-mexican-sofa

Expected behavior

Running rails test or bundle exec rails test to run tests.

Actual behavior

A sprockets error is generated:

/Users/someuser/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/railtie.rb:105:in `block in <class:Railtie>': Expected to find a manifest file in `app/assets/config/manifest.js` (Sprockets::Railtie::ManifestNeededError)
But did not, please create this file and use it to link any assets that need
to be rendered by your app:

Example:
  //= link_tree ../images
  //= link_directory ../javascripts .js
  //= link_directory ../stylesheets .css
and restart your server

Steps to reproduce

  1. Clone the repository and cd into it
  2. Run gem install bundler
  3. Run bundle install
  4. Run bundle exec rails test

System configuration

Rails version: 5.2.3

CMS version: n/a

Ruby version: 2.5.1p57

morgant avatar Oct 31 '19 19:10 morgant

This is caused by changes in sprockets 4, so an app/assets/config/manifest.js file is required (see sprockets/UPGRADING.md). Creating an empty manifest.js solves the issue.

morgant avatar Oct 31 '19 19:10 morgant