Open Andrew-Max opened 1 year ago
@Andrew-Max check out this closed solution... https://github.com/railsadminteam/rails_admin/issues/3572#issuecomment-1327976864
I was getting the same issue and after updating my package.json file to include the rails_admin content, and running yarn build:css
manually, I was able to move on.
package.json looks like this
...
"scripts": {
"build:css": "sass ./app/assets/stylesheets/application.sass.scss:./app/assets/builds/application.css ./app/assets/stylesheets/rails_admin.scss:./app/assets/builds/rails_admin.css --no-source-map --load-path=node_modules"
}
...
I also had to get my manifest.js file updated with
//= link rails_admin.css
//= link application-admin.css
I am running into this on a fresh install but running yarn build:css
does not clear up the issue.
Ok I missed some red output during rails g rails_admin:install
:
You need to merge "scripts": {
"build:css": "sass ./app/assets/stylesheets/rails_admin.scss:./app/assets/builds/rails_admin.css --no-source-map --load-path=node_modules"
} into the existing scripts in your package.json.
Taking 'build:css' as an example, if you're already have application.sass.css for the sass build, the resulting script would look like:
sass ./app/assets/stylesheets/application.sass.scss:./app/assets/builds/application.css ./app/assets/stylesheets/rails_admin.scss:./app/assets/builds/rails_admin.css --no-source-map --load-path=node_modules
Correctly following those instructions fixed my issue.
The installer adds a bunch of unnecessary files for rails 7 apps (yarn.lock, package.json, node_modules, rails_admin.js, etc) if you remove everything it generates except the config/initializers/rails_admin.rb
and set asset delivery to sprockets it works fine out of the box.
fixed for all here #3683
Describe the bug If I create a new rails 7 app and follow the install instructions, the application will not run. It fails with this error
Reproduction steps Create a new rails 7 app and exactly follow the install instructions
Expected behavior Installation works using the docs
Additional context