Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/64.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
Css Rails 4,资产编译_Css_Ruby On Rails_Ruby_Heroku_Assets - Fatal编程技术网

Css Rails 4,资产编译

Css Rails 4,资产编译,css,ruby-on-rails,ruby,heroku,assets,Css,Ruby On Rails,Ruby,Heroku,Assets,我可能要浪费4个小时来解决这个问题,但我不确定问题出在哪里 在本地,我一直在创建我的Rails应用程序,并正确加载所有资产,如下所示: <link data-turbolinks-track="true" href="/assets/application.css?body=1" media="all" rel="stylesheet" /> <link data-turbolinks-track="true" href="/assets/auth.css?body=1" me

我可能要浪费4个小时来解决这个问题,但我不确定问题出在哪里

在本地,我一直在创建我的Rails应用程序,并正确加载所有资产,如下所示:

<link data-turbolinks-track="true" href="/assets/application.css?body=1" media="all" rel="stylesheet" />
<link data-turbolinks-track="true" href="/assets/auth.css?body=1" media="all" rel="stylesheet" />
<link data-turbolinks-track="true" href="/assets/authenications.css?body=1" media="all" rel="stylesheet" />
<link data-turbolinks-track="true" href="/assets/customelements.css?body=1" media="all" rel="stylesheet" />
<link data-turbolinks-track="true" href="/assets/grid.css?body=1" media="all" rel="stylesheet" />
<link data-turbolinks-track="true" href="/assets/home.css?body=1" media="all" rel="stylesheet" />
<link data-turbolinks-track="true" href="/assets/material.css?body=1" media="all" rel="stylesheet" />
<link data-turbolinks-track="true" href="/assets/materials.css?body=1" media="all" rel="stylesheet" />
<link data-turbolinks-track="true" href="/assets/project_materials.css?body=1" media="all" rel="stylesheet" />
<link data-turbolinks-track="true" href="/assets/projects.css?body=1" media="all" rel="stylesheet" />
<link data-turbolinks-track="true" href="/assets/registrations.css?body=1" media="all" rel="stylesheet" />
<link data-turbolinks-track="true" href="/assets/show.css?body=1" media="all" rel="stylesheet" />
<link data-turbolinks-track="true" href="/assets/static.css?body=1" media="all" rel="stylesheet" />
<link data-turbolinks-track="true" href="/assets/testing.css?body=1" media="all" rel="stylesheet" />
<link data-turbolinks-track="true" href="/assets/grid.css?body=1" media="all" rel="stylesheet" />
<script data-turbolinks-track="true" src="/assets/jquery.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/jquery_ujs.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/auth.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/authenications.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/grid.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/mat.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/material.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/materials.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/polygon.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/project_materials.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/projects.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/registrations.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/static.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/testing.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/application.js?body=1"></script>
任何帮助都将不胜感激。。如果您想要更多代码,请查看我的github

谢谢

Heroku原木

$ heroku logs
2013-09-16T12:54:31.548606+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:140:in `variation'
2013-09-16T12:54:31.548606+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:133:in `call'
2013-09-16T12:54:31.548606+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:97:in `call'
2013-09-16T12:54:31.548606+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
2013-09-16T12:54:31.548606+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2013-09-16T12:54:31.548606+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
2013-09-16T12:54:31.548606+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2013-09-16T12:54:31.548787+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2013-09-16T12:54:31.548787+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2013-09-16T12:54:31.574177+00:00 heroku[router]: at=info method=GET path=/assets/application-6aa3a38ecf886de2bf443a2b4b67ab04.js host=buyabrickonline.herokuapp.com fwd="115.188.114.182" dyno=web.1 connect=3ms service=24ms status=500 bytes=334
2013-09-16T12:54:31.571790+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:133:in `call'
2013-09-16T12:54:31.571790+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:511:in `call'
2013-09-16T12:54:31.571790+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
2013-09-16T12:54:31.571790+00:00 app[web.1]: [2013-09-16 12:54:31] ERROR ArgumentError: wrong number of arguments (0 for 1)
2013-09-16T12:54:31.571790+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:140:in `variation'
2013-09-16T12:54:31.571790+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/ssl.rb:24:in `call'
2013-09-16T12:54:31.571790+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:97:in `call'
2013-09-16T12:54:31.571790+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
2013-09-16T12:54:31.571790+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2013-09-16T12:54:31.571790+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2013-09-16T12:54:31.571970+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2013-09-16T12:54:31.571970+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2013-09-16T12:54:31.553228+00:00 heroku[router]: at=info method=GET path=/assets/application-5c6e8eba841451fd8e44660093bd224e.css host=buyabrickonline.herokuapp.com fwd="115.188.114.182" dyno=web.1 connect=3ms service=9ms status=500 bytes=334
2013-09-16T12:54:31.885143+00:00 app[web.1]: [2013-09-16 12:54:31] ERROR ArgumentError: wrong number of arguments (0 for 1)
2013-09-16T12:54:31.885143+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:140:in `variation'
2013-09-16T12:54:31.885143+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/ssl.rb:24:in `call'
2013-09-16T12:54:31.885143+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:511:in `call'
2013-09-16T12:54:31.885143+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:133:in `call'
2013-09-16T12:54:31.885143+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:97:in `call'
2013-09-16T12:54:31.885143+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2013-09-16T12:54:31.885143+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2013-09-16T12:54:31.885290+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2013-09-16T12:54:31.885290+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2013-09-16T12:54:31.885143+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
2013-09-16T12:54:31.885143+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
2013-09-16T12:54:31.892947+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=buyabrickonline.herokuapp.com fwd="115.188.114.182" dyno=web.1 connect=2ms service=17ms status=500 bytes=334
2013-09-16T12:54:35.755436+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2013-09-16T12:54:35.755436+00:00 app[web.1]: [2013-09-16 12:54:35] ERROR ArgumentError: wrong number of arguments (0 for 1)
2013-09-16T12:54:35.755436+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:140:in `variation'
2013-09-16T12:54:35.755436+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:133:in `call'
2013-09-16T12:54:35.755436+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/ssl.rb:24:in `call'
2013-09-16T12:54:35.755436+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:511:in `call'
2013-09-16T12:54:35.755436+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:97:in `call'
2013-09-16T12:54:35.755436+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
2013-09-16T12:54:35.755436+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2013-09-16T12:54:35.755436+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
2013-09-16T12:54:35.755629+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2013-09-16T12:54:35.755629+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2013-09-16T12:54:35.757107+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=buyabrickonline.herokuapp.com fwd="115.188.114.182" dyno=web.1 connect=2ms service=10ms status=500 bytes=334
2013-09-16T12:54:43.891290+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
2013-09-16T12:54:43.891290+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2013-09-16T12:54:43.891290+00:00 app[web.1]: [2013-09-16 12:54:43] ERROR ArgumentError: wrong number of arguments (0 for 1)
2013-09-16T12:54:43.891290+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:140:in `variation'
2013-09-16T12:54:43.891290+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:133:in `call'
2013-09-16T12:54:43.891290+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/ssl.rb:24:in `call'
2013-09-16T12:54:43.891290+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:511:in `call'
2013-09-16T12:54:43.891290+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:97:in `call'
2013-09-16T12:54:43.891290+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
2013-09-16T12:54:43.891290+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2013-09-16T12:54:43.891475+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2013-09-16T12:54:43.891475+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2013-09-16T12:54:43.895919+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=buyabrickonline.herokuapp.com fwd="115.188.114.182" dyno=web.1 connect=29ms service=8ms status=500 bytes=334
2013-09-16T12:56:14.421956+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/ssl.rb:24:in `call'
2013-09-16T12:56:14.421956+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:140:in `variation'
2013-09-16T12:56:14.421956+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:133:in `call'
2013-09-16T12:56:14.421956+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:97:in `call'
2013-09-16T12:56:14.421956+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2013-09-16T12:56:14.421956+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:511:in `call'
2013-09-16T12:56:14.421956+00:00 app[web.1]: [2013-09-16 12:56:14] ERROR ArgumentError: wrong number of arguments (0 for 1)
2013-09-16T12:56:14.421956+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
2013-09-16T12:56:14.421956+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
2013-09-16T12:56:14.421956+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2013-09-16T12:56:14.422129+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2013-09-16T12:56:14.422129+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2013-09-16T12:56:14.423497+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=buyabrickonline.herokuapp.com fwd="115.188.114.182" dyno=web.1 connect=1ms service=5ms status=500 bytes=334
2013-09-16T13:00:55.666613+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:511:in `call'
2013-09-16T13:00:55.666613+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:97:in `call'
2013-09-16T13:00:55.666613+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
2013-09-16T13:00:55.666613+00:00 app[web.1]: [2013-09-16 13:00:55] ERROR ArgumentError: wrong number of arguments (0 for 1)
2013-09-16T13:00:55.666613+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:140:in `variation'
2013-09-16T13:00:55.666613+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:133:in `call'
2013-09-16T13:00:55.666613+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/ssl.rb:24:in `call'
2013-09-16T13:00:55.666613+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
2013-09-16T13:00:55.666613+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2013-09-16T13:00:55.666613+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2013-09-16T13:00:55.666801+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2013-09-16T13:00:55.666801+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2013-09-16T13:00:56.096391+00:00 app[web.1]: [2013-09-16 13:00:56] ERROR ArgumentError: wrong number of arguments (0 for 1)
2013-09-16T13:00:56.096391+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:140:in `variation'
2013-09-16T13:00:56.096391+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:133:in `call'
2013-09-16T13:00:56.096391+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/ssl.rb:24:in `call'
2013-09-16T13:00:56.096391+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:511:in `call'
2013-09-16T13:00:56.096391+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:97:in `call'
2013-09-16T13:00:56.096391+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
2013-09-16T13:00:56.096391+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2013-09-16T13:00:56.096391+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
2013-09-16T13:00:56.096391+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2013-09-16T13:00:56.096581+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2013-09-16T13:00:56.096581+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2013-09-16T13:00:56.100801+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=buyabrickonline.herokuapp.com fwd="115.188.114.182" dyno=web.1 connect=59ms service=7ms status=500 bytes=334
2013-09-16T13:00:55.669488+00:00 heroku[router]: at=info method=GET path=/assets/application-5c6e8eba841451fd8e44660093bd224e.css host=buyabrickonline.herokuapp.com fwd="115.188.114.182" dyno=web.1 connect=2ms service=5ms status=500 bytes=334
韦布里克向我扔错误

好的。。上述问题与我的SSL配置有关。。。修正了现在的问题是


所以我克隆了您的回购协议,并在本地进行了一次尝试,以下是我为使其生效而采取的步骤

production.rb

注释掉这一行,因为它在其他方面似乎不必要

  # Disable Rails's static asset server (Apache or nginx will already do this).
  #config.serve_static_assets = false
我也把这行注释掉了

  # Do not fallback to assets pipeline if a precompiled asset is missed.
  #config.assets.compile = true
这个呢

  # Specifies the header that your server uses for sending files.
  #config.action_dispatch.x_sendfile_header = "nill" # for apache
RAILS\u ENV=production RAILS s
现在似乎工作正常

我还通过运行
rake assets:clobber
删除了预编译的资产,我发现让Heroku在繁重的开发过程中进行预编译更容易,因为我发现在推到Heroku之前很容易忘记预编译并添加到git中


希望这能有所帮助。

因此我克隆了您的回购协议,并在本地进行了一次尝试,以下是我为使其生效而采取的步骤

production.rb

注释掉这一行,因为它在其他方面似乎不必要

  # Disable Rails's static asset server (Apache or nginx will already do this).
  #config.serve_static_assets = false
我也把这行注释掉了

  # Do not fallback to assets pipeline if a precompiled asset is missed.
  #config.assets.compile = true
这个呢

  # Specifies the header that your server uses for sending files.
  #config.action_dispatch.x_sendfile_header = "nill" # for apache
RAILS\u ENV=production RAILS s
现在似乎工作正常

我还通过运行
rake assets:clobber
删除了预编译的资产,我发现让Heroku在繁重的开发过程中进行预编译更容易,因为我发现在推到Heroku之前很容易忘记预编译并添加到git中


希望这有帮助。

您需要通过运行以下命令来预编译资产:

heroku run bundle exec rake assets:precompile

您需要通过运行以下命令预编译资产:

heroku run bundle exec rake assets:precompile

你能和堆栈跟踪共享heroku日志的内容吗?当然。现在看看帖子。嗯,初始化webrick好像有问题。如果尝试在本地环境上运行生产服务器,会发生什么情况
RAILS\u ENV=production RAILS s
它是启动还是消亡?但是页面会加载。只是不是css文件?有很多来回,但控制器中的
grid
方法是什么,而
grid.html.erb
似乎是javascript和css的奇怪组合。下一步我能想到的最好办法是暂时将更好的错误移到Gemfile的主级别,并用它来浏览……你能用堆栈跟踪共享heroku日志的内容吗?当然。现在看看帖子。嗯,初始化webrick好像有问题。如果尝试在本地环境上运行生产服务器,会发生什么情况
RAILS\u ENV=production RAILS s
它是启动还是消亡?但是页面会加载。只是不是css文件?有很多来回,但控制器中的
grid
方法是什么,而
grid.html.erb
似乎是javascript和css的奇怪组合。我能想到的下一步最好的办法是暂时将更好的错误转移到Gemfile的主级别,并用它来浏览。。。。