Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.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 4 Heroku资产轨道4_Ruby On Rails 4_Heroku_Assets - Fatal编程技术网

Ruby on rails 4 Heroku资产轨道4

Ruby on rails 4 Heroku资产轨道4,ruby-on-rails-4,heroku,assets,Ruby On Rails 4,Heroku,Assets,我刚刚第一次在heroku上部署了一个新应用程序 与其他许多人不同,我在预编译资产时没有遇到任何问题。它们被整齐地预先编译并放置在 公共/资产。我在heroku bash终端验证了这一点 但是,当我打开项目网页时,我的任何资产都不会被提供。我验证了避免缓存内容的哈希是正确的 我在我的应用程序.rb中添加了config.serve\u static\u assets=true,但没有任何区别 那里有public/assets/manifest.json(指向正确的文件),但没有yml,我想我在什么

我刚刚第一次在heroku上部署了一个新应用程序

与其他许多人不同,我在预编译资产时没有遇到任何问题。它们被整齐地预先编译并放置在
公共/资产
。我在heroku bash终端验证了这一点

但是,当我打开项目网页时,我的任何资产都不会被提供。我验证了避免缓存内容的哈希是正确的

我在我的
应用程序.rb
中添加了
config.serve\u static\u assets=true
,但没有任何区别

那里有
public/assets/manifest.json
(指向正确的文件),但没有
yml
,我想我在什么地方读到了manifest.yml。这可能是问题所在吗

关于如何调试这个有什么建议吗?或者可能出了什么问题

编辑 在回答评论时,请举一个例子:

heroku应用程序中有一个文件(通过heroku bash检查)
public/assets/application-7744776478cb6ee3a23dd79bfcc293bd.css

我的浏览器向heroku应用程序询问: 'assets/application-7744776478cb6ee3a23dd79bfcc293bd.css'
heroku应用程序的答案是404文件未找到。

我通过添加gem rails\u 12factor解决了这个问题


建议在:

这是一个很好的问题描述,不幸的是,您缺少有关缺少资产的重要细节。a) 资产路径是如何呈现的?b) 你有404吗?c) 你能在heroku上找到那些文件吗?我的编辑是否填补了空白?