[英]Rails & themeforest integration issue, getting routing error
I am trying to integrate themeforest template into Rails app. 我正在尝试将themeforest模板集成到Rails应用程序中。 I am getting a routing error 我收到路由错误
ActionController::RoutingError (No route matches [GET] "/assets/fonts/fontawesome-webfont.woff"): ActionController :: RoutingError(没有路由与[GET]“ / assets / fonts / fontawesome-webfont.woff”匹配):
I actually followed the solution given in this Themeforest to Rails App 我实际上遵循了这个主题林中给Rails App的解决方案
The structure is as 结构如下
-assets - fonts - images - javascripts - stylesheets
My font-awesome.css file has 我的font-awesome.css文件有
@font-face { font-family: 'FontAwesome'; src: url('fonts/fontawesome-webfont.eot?v=4.2.0'); src: url('fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'), url('fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'), url('fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'), url('fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg'); font-weight: normal; font-style: normal; }
Where am I going wrong? 我要去哪里错了?
I think the problem is how you use path, you can change it to 我认为问题在于您如何使用路径,可以将其更改为
@font-face {
font-family: 'FontAwesome';
src: asset-url('fontawesome-webfont.eot');
src: asset-url('fontawesome-webfont.eot') format('embedded-opentype'),
asset-url('fontawesome-webfont.woff') format('woff'),
asset-url('fontawesome-webfont.ttf') format('truetype'),
asset-url('fontawesome-webfont.svg#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.