【发布时间】:2014-07-17 19:50:44
【问题描述】:
我正在尝试消除使用 Bootstrap 3 的 Rails 4 项目中的字形图标错误。我没有使用任何 Bootstrap gem 将其添加到资产管道中。我手动将 bootstrap.css 和 bootstrap.js 添加到它们各自的 app/assets 目录中,并将它们添加到 application.css 和 application.js 我现在在我的 Web 浏览器的控制台中看到以下内容:
GET http://localhost:3000/fonts/glyphicons-halflings-regular.woff 404 (Not Found) localhost/:1
GET http://localhost:3000/fonts/glyphicons-halflings-regular.ttf 404 (Not Found) localhost/:1
GET http://localhost:3000/fonts/glyphicons-halflings-regular.svg 404 (Not Found)
如何在 Ruby on Rails 应用程序中解决此问题?我尝试将上述文件复制到app/assets/fonts 并将其弹出到application.rb:
config.assets.paths << "#{Rails}/app/assets/fonts"
运气不好。
【问题讨论】:
标签: css ruby-on-rails ruby twitter-bootstrap ruby-on-rails-4