Rails NoMethodError: undefined method `assets' for #Rails::Application::Configuration After install activeadmin #422
Unanswered
tms-luandang2
asked this question in
Q&A
Replies: 2 comments 1 reply
-
I had to add the following in # Hack to allow ActiveAdmin to use Vite by pretending to be Webpacker
module ActiveAdminViteJS
def stylesheet_pack_tag(style, **)
style = "active_admin.scss" if style == "active_admin.css"
vite_stylesheet_tag(style, **)
end
def javascript_pack_tag(script, **)
vite_javascript_tag(script, **)
end
end
ActiveAdmin::Views::Pages::Base.include ActiveAdminViteJS and ActiveAdmin.setup do |config|
config.use_webpacker = true
# ... |
Beta Was this translation helpful? Give feedback.
1 reply
-
I solved it by installing gem sprockets-rails |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When I install activeadmin. Does vite_rails support activeadmin?
Beta Was this translation helpful? Give feedback.
All reactions