Activeadmin Rails 7 Tailwind Issue

280 Views Asked by At

Just install active_admin in rails 7 and ruby 3.1.0

gem 'activeadmin', github: 'activeadmin/activeadmin', branch: 'master'

It add two style files. One is active_admin_old.scss and other is active_admin.css which a code like it

@tailwind base;
@tailwind components;
@tailwind utilities;

Now when i run server I get UI like it

enter image description here

If i rename active_admin_old.scss to active_admin.scsss then UI is like that

enter image description here

How can i fix it?

1

There are 1 best solutions below

0
On

It is already published activeadmin 3.1.0 in rubygems. This version is compatible with rails 7 and it seems css is working correctly, this version does not provide the tailwind css version.

In your special case I would change in your Gemfile:

gem 'activeadmin', github: 'activeadmin/activeadmin', branch: 'master'

by

gem 'activeadmin'

And execute bundle update

On a clean installation I would follow common steps adding typical gems to your Gemfile:

gem 'activeadmin'
gem 'sass-rails'
gem 'devise'
gem 'cancancan'
gem 'draper'
gem 'pundit'

And run bundle install