Skip to content

Commit

Permalink
Add sprockets manifest before running rails commands
Browse files Browse the repository at this point in the history
Due to a bug in sprockets-rails[1] we need to manually
add the sprockets manifest into the generated rails
app before running any rails commands inside the rails
app folder.

[1](rails/sprockets-rails#546)
  • Loading branch information
tvdeyen committed Feb 18, 2025
1 parent 34b20d8 commit e23b61c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,18 @@ To add Solidus, begin with a newly created Rails application with its database.
rails new my_store
```

> [!CAUTION]
> Due to [a bug in `sprockets-rails`](https://github.com/rails/sprockets-rails/pull/546) we need to manually add the sprockets manifest into the generated rails app **before** running any rails commands inside the rails app folder.
```bash
mkdir -p my_store/app/assets/config
cat <<MANIFEST > my_store/app/assets/config/manifest.js
//= link_tree ../images
//= link_directory ../javascripts .js
//= link_directory ../stylesheets .css
MANIFEST
```

### Installing Solidus

In your application's root folder run:
Expand All @@ -99,6 +111,9 @@ bundle add solidus
bin/rails g solidus:install
```

> [!NOTE]
> Please make sure to generate the sprockets manifest before running the `solidus:install` generator.
And follow the prompt's instructions.
### Accessing Solidus Store

Expand Down

0 comments on commit e23b61c

Please sign in to comment.