Ruby on rails 4 ActionController::RoutingError(没有与[GET]";/font/fontello.woff";匹配的路由)
下午好,我正在生产中准备linux+apache+passenger+rvm+rails 4下的服务器,我提出的问题是图标外观,第一个已经超越的问题是采用样式css,我通过启用以下功能来解决: #如果缺少预编译的资产,请不要回退到资产管道。 config.assets.compile=true #为资源URL生成摘要。 config.assets.digest=true 在/config/environments/production.rb中 但它仍然存在图标问题,请参考以下路径: /项目/应用程序/资产/样式表/fontello/Ruby on rails 4 ActionController::RoutingError(没有与[GET]";/font/fontello.woff";匹配的路由),ruby-on-rails-4,asset-pipeline,stylesheet,passenger,production,Ruby On Rails 4,Asset Pipeline,Stylesheet,Passenger,Production,下午好,我正在生产中准备linux+apache+passenger+rvm+rails 4下的服务器,我提出的问题是图标外观,第一个已经超越的问题是采用样式css,我通过启用以下功能来解决: #如果缺少预编译的资产,请不要回退到资产管道。 config.assets.compile=true #为资源URL生成摘要。 config.assets.digest=true 在/config/environments/production.rb中 但它仍然存在图标问题,请参考以下路径: /项目/应用
提前感谢如果我正确理解了你的问题,那就是我回来时面临的问题。我通过更改
/app/assets/stylesheets/icons.css
文件解决了我的问题:
@font-face {
font-family: 'icons';
src: url('../font/icons.eot?26481838');
src: url('../font/icons.eot?26481838#iefix') format('embedded-opentype'),
url('../font/icons.woff?26481838') format('woff'),
url('../font/icons.ttf?26481838') format('truetype'),
url('../font/icons.svg?26481838#icons') format('svg');
font-weight: normal;
font-style: normal;
}
我从每行的beggining中删除了“./”
,因此它看起来像这样:
@font-face {
font-family: 'icons';
src: url('font/icons.eot?26481838');
src: url('font/icons.eot?26481838#iefix') format('embedded-opentype'),
url('font/icons.woff?26481838') format('woff'),
url('font/icons.ttf?26481838') format('truetype'),
url('font/icons.svg?26481838#icons') format('svg');
font-weight: normal;
font-style: normal;
}
希望这有帮助 2017年登记入住。此修复对我不起作用,当我发现发生了什么时,将向您报告。