2013-09-16 170 views
0

我可能已经浪费了4个小时,试图让这个问题消失,不知道问题出在哪里。Rails 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> 

因此,冷却工作在发展模式......但后来它不工作时我推到heroku!

<title>BuyABrick</title> 
<link data-turbolinks-track="true" href="/assets/application-5c6e8eba841451fd8e44660093bd224e.css" media="all" rel="stylesheet" /> 
<link data-turbolinks-track="true" href="/assets/grid-fc208f1a1279c5b79eec166dc18c02f6.css" media="all" rel="stylesheet" /> 
<script data-turbolinks-track="true" src="/assets/application-6aa3a38ecf886de2bf443a2b4b67ab04.js"></script> 
<meta content="authenticity_token" name="csrf-param" /> 
<meta content="aCmkfVxhDEO4PtC3AdHhLZ9smJ+9shdchBT0mkYqQvM=" name="csrf-token" /> 

当我在

<link data-turbolinks-track="true" href="/assets/application-5c6e8eba841451fd8e44660093bd224e.css" media="all" rel="stylesheet" /> 

服务器返回给我点击一个内部服务器错误(编辑没有意识到的HTML螺丝的一切在这里)

enter image description here

因此,我通过研究互联网为人类所知的一切尝试了所有的灵魂。这里有

BuyABrick::Application.configure do 
    # Settings specified here will take precedence over those in config/application.rb. 

    # Code is not reloaded between requests. 
    config.cache_classes = true 

    # Eager load code on boot. This eager loads most of Rails and 
    # your application in memory, allowing both thread web servers 
    # and those relying on copy on write to perform better. 
    # Rake tasks automatically ignore this option for performance. 
    config.eager_load = true 

    # Full error reports are disabled and caching is turned on. 
    config.consider_all_requests_local  = false 
    config.action_controller.perform_caching = true 

    # Enable Rack::Cache to put a simple HTTP cache in front of your application 
    # Add `rack-cache` to your Gemfile before enabling this. 
    # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. 
    # config.action_dispatch.rack_cache = true 

    # Disable Rails's static asset server (Apache or nginx will already do this). 
    config.serve_static_assets = true 

    # Compress JavaScripts and CSS. 
    config.assets.js_compressor = :uglifier 
    # config.assets.css_compressor = :sass 

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

    # Generate digests for assets URLs. 
    config.assets.digest = true 

    # Version of your assets, change this if you want to expire all your assets. 
    config.assets.version = '1.0' 

    # Specifies the header that your server uses for sending files. 
    config.action_dispatch.x_sendfile_header = "nill" # for apache 
    # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx 

    # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. 
    config.force_ssl = true 

    # Set to :debug to see everything in the log. 
    config.log_level = :info 

    # Prepend all log lines with the following tags. 
    # config.log_tags = [ :subdomain, :uuid ] 

    # Use a different logger for distributed setups. 
    # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) 

    # Use a different cache store in production. 
    # config.cache_store = :mem_cache_store 

    # Enable serving of images, stylesheets, and JavaScripts from an asset server. 
    # config.action_controller.asset_host = "http://assets.example.com" 

    # Precompile additional assets. 
    # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. 
    config.assets.precompile += %w(application.css) 

    # Ignore bad email addresses and do not raise email delivery errors. 
    # Set this to true and configure the email server for immediate delivery to raise delivery errors. 
    # config.action_mailer.raise_delivery_errors = false 

    # Enable locale fallbacks for I18n (makes lookups for any locale fall back to 
    # the I18n.default_locale when a translation can not be found). 
    config.i18n.fallbacks = true 

    # Send deprecation notices to registered listeners. 
    config.active_support.deprecation = :notify 

    # Disable automatic flushing of the log to improve performance. 
    # config.autoflush_log = false 

    # Use default logging formatter so that PID and timestamp are not suppressed. 
    config.log_formatter = ::Logger::Formatter.new 
end 

任何帮助将不胜感激,我有文件...

配置/环境/ production.rb ..如果你想要更多的代码看着我的github上..

https://github.com/srizzling/BuyABrick

谢谢!

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 

的WEBrick夹紧错误在我

enter image description here

好吧..这个问题上面做我的SSL配置...固定的,现在的问题是.. 。

enter image description here

+0

你可以分享的'的Heroku与堆栈跟踪logs'的内容? – muttonlamb

+0

肯定的事情。现在看帖子。 –

+0

嗯,看起来像初始化webrick的问题。如果您尝试在本地环境中运行生产服务器,会发生什么情况? 'RAILS_ENV =生产导轨s'它开机还是死? – muttonlamb

回答

4

因此,我克隆了您的回购并在当地进行了一场游戏,这是我为实现目标所采取的步骤。

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_ENV=production rails s现在似乎工作得很好。

我也通过运行rake assets:clobber除去预编译的资产,我觉得它更容易让Heroku的比较大的发展过程中做预编译,因为我觉得它太容易忘记预编译,并添加推送到Heroku的前与git ...

希望这会有所帮助。

+0

那真棒!解决了我所有的问题! –

0

您需要通过运行预编译的资产:

heroku run bundle exec rake assets:precompile