我已在 AWS OpsWorks 上部署了一个应用程序。我可以看到正在开发中的字形,但在生产中却看不到。
Assets :预编译
run "cd /srv/www/inreviapp/current && /usr/local/bin/bundle exec rake assets:precompile RAILS_ENV=production"
自定义.css.scss
@import "bootstrap-sprockets";
@import "bootstrap";
@import "bootstrap/glyphicons";
...
我也尝试将其放入 custom.css.scss
@font-face {
font-family: 'Glyphicons Halflings';
src: url("fonts/bootstrap/glyphicons-halflings-regular.eot");
src: url("fonts/bootstrap/glyphicons-halflings-regular.eot?#iefix") format("embedded-opentype"), url("fonts/bootstrap/glyphicons-halflings-regular.woff") format("woff"), url("fonts/bootstrap/glyphicons-halflings-regular.ttf") format("truetype"), url("fonts/bootstrap/glyphicons-halflings-regular.svg#glyphicons_halflingsregular") format("svg");
}
最佳答案
尝试
RAILS_ENV='production' rake assets:precompile
关于ruby-on-rails - Rails 4,Bootstrap-sass 3 : glyphicons not showing in production,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26133804/