我正在使用 护栏→5.2 红宝石→2.4 MDBootstrap
我正在使用3个独立的引导程序相关框架 sb-admin-2(旧版本), 车门模板 mdbootstrap
sb-admin 2用于应用程序/资产 cardoor用于vendor / cardoor /
我正在使用自定义布局设置根目录包含
-vendor
-customer
-font
-img
-javascripts
-stylesheets
stylesheets文件夹包含以下文件
vendor/customer/stylesheets/all.css
vendor/customer/stylesheets/bootstrap.css
vendor/customer/stylesheets/font-awesome.css
vendor/customer/stylesheets/mdb.css
vendor/customer/stylesheets/mdb.lite.css
vendor/customer/stylesheets/mdb.lite.min.css
vendor/customer/stylesheets/mdb.min
vendor/customer/stylesheets/customer.css
我使用了customer.css而不是application.css
供应商/客户/样式表/customer.css
/*
*= require customer/stylesheets/bootstrap
*= require customer/stylesheets/bootstrap.min
*= require customer/stylesheets/mdb
*= require customer/stylesheets/mdb.lite
*= require customer/stylesheets/mdb.lite.min
*= require customer/stylesheets/mdb
*= require customer/stylesheets/all
*= require customer/stylesheets/font-awesome
*= require customer/stylesheets/style
*= require customer/stylesheets/style.min
*= require customer/stylesheets/addons/datatables-select
*= require customer/stylesheets/addons/datatables-select.min
*= require customer/stylesheets/addons/datatables
*= require customer/stylesheets/addons/datatables.min
*= require customer/stylesheets/addons/directives
*= require customer/stylesheets/addons/directives.min
*= require customer/stylesheets/addons/flag
*= require customer/stylesheets/addons/flag.min
*= require customer/stylesheets/addons/rating
*= require customer/stylesheets/addons/rating.min
*= require selectize
*= require bootstrap-datetimepicker
*= require selectize.default
*= require select2.min
initializers / assets.rb
Rails.application.config.assets.precompile += %w( rtt_demo/stylesheets/rtt_demo.css )
Rails.application.config.assets.precompile += %w( rtt_demo/javascripts/rtt_demo.js )
layouts / customer.html.erb
<%= stylesheet_link_tag 'rtt_demo/stylesheets/rtt_demo', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'rtt_demo/javascripts/rtt_demo', 'data-turbolinks-track': 'reload' %>
我遇到以下错误,并且fontawesome图标未显示
可下载的字体:下载失败(字体家族:“ Font Awesome 5 Free”样式:常规重量:900拉伸:100 src索引:2):status = 2147746065来源:http://localhost:3000/assets/customer/webfonts/fa-solid-900.woff
可下载的字体:下载失败(字体家族:“ Font Awesome 5 Free”样式:正常重量:900拉伸:100 src索引:3):status = 2147746065来源:http://localhost:3000/assets/customer/webfonts/fa-solid-900.ttf
可下载的字体:下载失败(字体家族:“ Font Awesome 5 Free”样式:常规重量:900拉伸:100 src索引:1):status = 2147746065来源:http://localhost:3000/assets/customer/webfonts/fa-solid-900.woff2