ruby-on-railsasset-pipelinerails-admin

The asset "rails_admin/rails_admin.css" is not present in the asset pipeline. ):


I am using rails admin. My application is working perfectly in local but when its throwing the above error while configuring in live

config/initializers/assets.rb

  Rails.application.config.assets.precompile += %w(*.css *.js ckeditor/*)

But when I precompile my assets, nothing is compiled.


Solution

  • Possible Solution

    1. install yarn

    2. install webpacker by running

      RAILS_ENV=production bundle exec rails webpacker:install 
      
    3. production.rb

      config.assets.compile = true
      
    4. Now precompile your assets

      RAILS_ENV=production bundle exec rails assets:precompile