brentd / xray-rails

☠️ A development tool that reveals your UI's bones
MIT License
1.22k stars 79 forks source link

Test suite fails with Sprockets::Railtie::ManifestNeededError #105

Open mattbrictson opened 4 years ago

mattbrictson commented 4 years ago

Using a fresh checkout of master and with Ruby 2.7.0, the test suite fails to run with these errors:

Failure/Error: Dummy::Application.initialize!

Sprockets::Railtie::ManifestNeededError:
  Expected to find a manifest file in `app/assets/config/manifest.js`
  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
# ./spec/dummy/config/environment.rb:5:in `<top (required)>'

It seems that the test suite is incompatible with Sprockets 4.

2called-chaos commented 4 years ago

This file generates with new rails 6 projects for me so I guess it must be added to the dummy? But I played around a little bit and I can't get it to work with current master. I don't know how to include xray with webpacker. In our legacy project which we recently upgraded to Rails 6 but without webpacker I get it to work when I manually include both the JS and CSS (via scss import).

Maybe it's my old macbook that ghosts the key, one of my many extensions or something random but I had to fiddle myself a different keyboard shortcut.

assets.debug is set to true but before (v3) it did many script/style tags and now it just does a single /assets/application.debug-[...].css/js. But the new project also still generated with the config/assets.rb and the same comment about precompiling additional assets. But the app should use the manifest now? I don't know tbh.