-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rails 7 with Importmap: Rails Admin SCSS :- unreadable: @import rails_admin/src/rails_admin/styles/base. Fix Using Yarn/NPM #3683
Comments
Proposed SolutionProblem :- _cant find the path **@import "rails_admin/src/rails_admin/styles/base";
gem 'rails_admin', '~> 3.0', github: "railsadminteam/rails_admin", branch: "master"
Enjoy Why This Solution Is ImportantThis setup ensures that Rails Admin's styles are fully integrated into a Rails 7 application using Importmap, leveraging Yarn or NPM for asset management. It addresses the common pitfalls related to asset compilation in this environment and provides a clear path for developers to ensure their administrative interfaces are styled as expected. This detailed solution aims to help anyone facing similar configuration challenges, and it's prepared to serve as a comprehensive guide for proper integration of Rails Admin in a modern Rails setup. |
Isn't your issue just not following this instruction? Aside from that, the procedure almost looks same as what the install generator does: |
Describe the bug
Integrating Rails Admin in a Rails 7 environment with Importmap and asset management via Yarn or NPM leads to an issue where the
rails_admin.scss
does not compile correctly. The styles are not applied as expected, indicating that the asset pipeline may not be properly importing styles from the specified SCSS path.Reproduction Steps
gem 'rails_admin'
to your Gemfile and runbundle install
.rails g rails_admin:install
.rails s
./admin
to observe the styling issue.Expected Behavior
Navigating to the
/admin
route should display the Rails Admin interface styled correctly, showcasing a fully functional and visually appealing UI consistent with Rails Admin standards.Additional Context
The text was updated successfully, but these errors were encountered: