Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/59.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Glyphion rails的路由错误_Ruby On Rails_Glyphicons - Fatal编程技术网

Ruby on rails Glyphion rails的路由错误

Ruby on rails Glyphion rails的路由错误,ruby-on-rails,glyphicons,Ruby On Rails,Glyphicons,我将此用于bootsrap,但glyphicon不显示。我得到了这个错误: ActionController::RoutingError(没有与[GET]匹配的路由) “/assets/twitter/font/glyphions/halflings regular.woff”): ActionController::RoutingError(没有与[GET]匹配的路由) “/assets/twitter/font/glyphions/halflings regular.ttf”): 我尝试在我

我将此用于bootsrap,但glyphicon不显示。我得到了这个错误:

ActionController::RoutingError(没有与[GET]匹配的路由) “/assets/twitter/font/glyphions/halflings regular.woff”):

ActionController::RoutingError(没有与[GET]匹配的路由) “/assets/twitter/font/glyphions/halflings regular.ttf”):


我尝试在我的资源中使用字体创建文件夹,但这对我没有帮助。

解决方案之一是将文件放在应用程序的公共目录中。在您的情况下是:
(Rails\u app)/public/assets/twitter/font/glyphicons halflings regular.woff

(Rails\u app)/public/assets/twitter/font/glyphions halflings regular.ttf


公共文件是应用程序的根目录。

我使用以下步骤解决此问题:

  • 从github站点手动下载引导包(作为zip):
  • 上载然后解压缩生产服务器/tmp文件夹中的包
  • 在%approt/public/assets/twitter/font下手动创建文件夹
  • 将“bootstrap master/fonts/*”复制到上述文件夹中
  • RAILS\u ENV=生产包执行rake资产:预编译
  • 重新启动rails服务器

  • git repo中没有您描述的“bootstrap master/fonts/*”文件夹