-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Description Following the official Solidus Getting Started guide to set up a new project, the bin/rails generate solidus:install
command fails immediately after running rails new
and bundle add solidus
.
The error, Sprockets::Railtie::ManifestNeededError
, indicates that a manifest file is missing, which is a file used to manage assets.
Steps to Reproduce
- Create a new Rails project:
rails new -T fishmart
- Navigate into the project directory:
cd fishmart
- Add Solidus to the project:
bundle add solidus
- Run the Solidus installation generator:
bin/rails generate solidus:install
Expected Behavior
The solidus:install
generator should run successfully, setting up the necessary files and configurations for the Solidus e-commerce platform.
Actual Behavior
The command fails with the following error stack trace:
/usr/local/rvm/gems/ruby-3.4.1/gems/sprockets-rails-3.5.2/lib/sprockets/railtie.rb:106: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
For more information see: https://github.com/rails/sprockets/blob/070fc01947c111d35bb4c836e9bb71962a8e0595/UPGRADING.md#manifestjs
Environment
- Ruby version: 3.4.1
- Rails version: 8.0.2.1
- Solidus version: 4.6
- Operating System: Linux (Ubuntu)
Additional Context
This appears to be a compatibility issue between the asset pipeline setup in the latest version of Rails and the solidus:install
generator, which seems to expect a file (app/assets/config/manifest.js
) that is not created by default in a new Rails 8 project.
The new Rails 8 template uses Importmap as the default JavaScript solution, which may conflict with Solidus's asset requirements, specifically those related to Sprockets.
This issue prevents the basic installation of Solidus on a fresh Rails 8 application, making it impossible to follow the official guide.