ruby-on-rails - Rails 4,Bootstrap-sass 3 : glyphicons not showing in production

标签 ruby-on-rails twitter-bootstrap

我已在 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/

相关文章:

ruby-on-rails - 什么是 Ruby 中基于 Rack 的服务器

javascript - 屏幕太小时 Bootstrap 下拉菜单右侧

twitter-bootstrap - Selenium webdriver click 与 action.click 有什么区别?

jquery - 是否可以在内联 Bootstrap Datepicker 上使用 setDate?

ruby-on-rails - 我可以将 PostgreSQL 的 "Special Date/Time Inputs"与 ActiveRecord 一起使用吗?

ruby-on-rails - Stripe::Customer.create 未将付款方式附加到客户

ruby-on-rails - 检查时间是否介于 ruby 的两倍之间

ruby-on-rails - 如何在 Stripe (Rails) 中创建费用和客户

css - Bootstrap 网格布局

twitter-bootstrap - 如何配置 webpack 来运行 bootstrap 和 sass?