Replies: 14 comments 52 replies
-
Hi @amkisko. First and foremost, thank you for creating a discussion. This may be doable from some past experimenting so I will share my thoughts on how I think it could work but it's not something that the library will support. I know some others are interested in this as well. You would have to use and customize From there, you'll have to copy the Resources: |
Beta Was this translation helpful? Give feedback.
-
Would it be possible to get some kind of example app or at least more detailed solution? I'm trying to setup exactly this, but still struggling and can't quite make it work. What should we put in this config file, is there a need for another tailwind css file besides generated one and where from to call require |
Beta Was this translation helpful? Give feedback.
-
@amkisko @djolereject @javierjulio This is what I did as part of my upgrade from ActiveAdmin 3.x to the latest 4.0 (beta.4). I took inspiration in the I think this also could be a good default for ActiveAdmin, since I think many are wanting to not have node installed when developing with Rails ( How to do it
|
Beta Was this translation helpful? Give feedback.
-
Thank for the detailed explanation! |
Beta Was this translation helpful? Give feedback.
-
What is the suggestion on extending header and layout of ActiveAdmin v4? That's what I been up to before: module AdminPageLayoutOverride
def build_page(*args)
within super do
render "active_admin/layout_additions"
end
end
def build_active_admin_head
within super do
render "active_admin/header"
end
end
end
ActiveAdmin::Views::Pages::Base.prepend AdminPageLayoutOverride |
Beta Was this translation helpful? Give feedback.
-
This thread might become a more general "migration to v4" topic. I've got another one, that can't figure out how to fix, getting this for all resources except custom pages:
|
Beta Was this translation helpful? Give feedback.
-
Also it was not really clear how
|
Beta Was this translation helpful? Give feedback.
-
It would be much easier if you just shipped bundled versions of Here's an example of how Avo solves it: But it can be even simpler. Just a pre-commit hook that will run tailwind building and save the output into |
Beta Was this translation helpful? Give feedback.
-
@javierjulio what is the current support level for Turbo in ActiveAdmin? At least I have not seen any traces of usage here. One thing that does not properly work is form errors, there is a reply from server but HTML code from response is not applied to the current page, I've been experiencing such starting from v3. Have you seen such behaviour? |
Beta Was this translation helpful? Give feedback.
-
I've made a gem to allow running ActiveAdmin v4 without any asset setup: activeadmin_assets. Please note that it limits customizability as described in the README. |
Beta Was this translation helpful? Give feedback.
-
I wanted to get ActiveAdmin v4 (beta13) working with Rails v8.0.0, using In my case I wasn't using tailwind for anything else, and rails is mostly being used just as an API. This is what I had to do:
After that, I have a working ActiveAdmin installation, using |
Beta Was this translation helpful? Give feedback.
-
I have read through several conversations here about that subject, but I could figure it out. My app was created with Before Rails 8 (with sprocket), I could do the following to have ActiveAdmin work with Tailwind + SCSS
...
gem "activeadmin", "~> 3.2"
gem "sass-rails", "~> 6.0"
module SassCompressorMonkeypatch
def call_processor(processor, input)
super
rescue SassC::SyntaxError => e
raise unless processor == Sprockets::SassCompressor
puts "Warning: Could not compress #{input[:filename]} with Sprockets::SassCompressor. Returning uncompressed result." unless Rails.env.test?
metadata = (input[:metadata] || {}).dup
metadata[:data] = input[:data]
metadata
end
end
Sprockets::Base.prepend(SassCompressorMonkeypatch) With Rails 8.0.0 (with propshaft), It seems I have to use the beta and I saw activeadmin_assets.
I might have done it wrong, but that didn't work out. So for now, I have no Idea how to use ActiveAdmin with Rails 8.0.0 (+ propshaft). :( Is there a resource written somewhere that could guide me through the steps? |
Beta Was this translation helpful? Give feedback.
-
Rails developer for 10+ years here. I just want to express that it's 2025 and I'm struggling to set this up. Rails is going in the direction of simplifying things, but active admin v4 seems to be going in the opposite direction. Adding a dependency on |
Beta Was this translation helpful? Give feedback.
-
In case someone tries to set it up with Tailwindcss v4,
As you see, I used ruby 3.4.0 and activeadmin-4.0.0.beta15. After this, the js config file can be deleted. It is not useful to add |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
importmap-rails and propshaft do not require node and yarn to be installed, although cssbundling-rails requires.
Are there any options to patch ActiveAdmin to have no dependence on node/yarn?
References:
Beta Was this translation helpful? Give feedback.
All reactions