1

I am using tailwindcss-rails gem along with Flowbite(fyi). I developed a whole app on top of those two and recently I needed to add an admin gem to the app. I really like ActiveAdmin, but as soon as I add it and sassc-rails all of the app's style breaks and it doesn't use Tailwind classes. Because if I don't add sassc-rails ActiveAdmin won't run.

How can I make these two work together?

There is not much more I can add to the question, but if you need more info or some code snippets, please ask.

1 Answer 1

1

I managed to fix the issue by following this answer

Basically you need to move active_admin.js from app/assets/javascripts to vendor/assets/javascripts(you need to create these folders), and moving active_admin.scss from app/assets/stylesheets to vendor/assets/stylesheets.

Even though that was in the answer, it still didn't work, so if it doesn't for you, just do the following that helped me:

In vendor/assets/stylesheets/active_admin.scss:

// From this
@import "mixins";
@import "base";

// To this
@import "active_admin/mixins";
@import "active_admin/base";

And in vendor/assets/javascripts/active_admin.js:

//= require active_admin/base

Replace it with this in case you have some relative path appended that didn't work.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.