нужно все добавить в config/initializers/assets.rb
Rails.application.config.assets.precompile += %w( какой-то-js-файл.js )
Rails.application.config.assets.precompile += %w( какой-то-css-файл.css )
и сверху еще добавить пути
# Add additional assets to the asset load path
Rails.application.config.assets.paths << "#{Rails.root}/app/assets/backend/stylesheets" Rails.application.config.assets.paths << "#{Rails.root}/app/assets/backend/javascripts" Rails.application.config.assets.paths <<"#{Rails.root}/app/assets/backend/images"
Rails.application.config.assets.paths << "#{Rails.root}/app/assets/frontend/stylesheets"
Rails.application.config.assets.paths << "#{Rails.root}/app/assets/frontend/javascripts"
Rails.application.config.assets.paths << "#{Rails.root}/app/assets/frontend/images"