I am using webpacker for my asset pipeline in my rails app. I installed active admin as per the documentation. I moved the styleheet file and javascript file active_admin.js.coffee and active_admin.css from app/assets/stylesheets and app/assets/javascripts to vendor directory. To load these files from vendor directory I added following lines in my config/initializers/assets.rb
Rails.application.config.assets.precompile += %w( active_admin.js active_admin.scss )
But still rails is not able to find the file in my assets pipeline. It throws me error whenever I visit /admin path.
Sprockets::Rails::Helper::AssetNotFound in ActiveAdmin::Devise::Sessions#new
Showing /home/rabin/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/activeadmin-1.3.0/app/views/layouts/active_admin_logged_out.html.erb where line #9 raised:
The asset "active_admin.css" is not present in the asset pipeline.
I searched for entire stackoverflow but still can't figure out the problem.