2014-10-15 25 views
8

Ottieni un errore 500 su ogni altra finestra ricaricata.

assets/application-CACHE-.js non trovato. Nessuna idea che lo sta causando. Sviluppo dell'ambiente. Usando Unicorn come mio server web. Qualcuno sa di cosa si tratta?Strano comportamento in Rails 4.2.0.beta2 - Si tratta di un bug?

17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /blog HTTP/1.1" 200 - 0.2885 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /about-64845c436e75ac587deec98177291d4e.css?body=1 HTTP/1.1" 304 - 0.0110 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /blog-14053fca722628f43031ae06cb18c52c.css?body=1 HTTP/1.1" 304 - 0.0110 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /contact-64845c436e75ac587deec98177291d4e.css?body=1 HTTP/1.1" 304 - 0.0112 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /layouts/partials/footer-71929e4ed77e723296d6a937e6469653.css?body=1 HTTP/1.1" 304 - 0.0116 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /portfolio-64845c436e75ac587deec98177291d4e.css?body=1 HTTP/1.1" 304 - 0.0133 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /layouts/partials/navigation-1d28f98b6c63feaf0bd6b06fb5873475.css?body=1 HTTP/1.1" 304 - 0.0136 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /resources-64845c436e75ac587deec98177291d4e.css?body=1 HTTP/1.1" 304 - 0.0130 
17:07:13 web.1 | Rack::Lint::LintError: Content-Type header found in 304 response, not allowed 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/rack-1.6.0.beta/lib/rack/lint.rb:20:in `assert' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/rack-1.6.0.beta/lib/rack/lint.rb:651:in `block in check_content_type' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/rack-1.6.0.beta/lib/rack/lint.rb:647:in `each' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/rack-1.6.0.beta/lib/rack/lint.rb:647:in `check_content_type' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/rack-1.6.0.beta/lib/rack/lint.rb:58:in `_call' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/rack-1.6.0.beta/lib/rack/lint.rb:37:in `call' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/rack-1.6.0.beta/lib/rack/showexceptions.rb:24:in `call' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/rack-1.6.0.beta/lib/rack/commonlogger.rb:33:in `call' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/rack-1.6.0.beta/lib/rack/chunked.rb:54:in `call' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/rack-1.6.0.beta/lib/rack/content_length.rb:15:in `call' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:576:in `process_client' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:670:in `worker_loop' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:525:in `spawn_missing_workers' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:140:in `start' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/unicorn-4.8.3/bin/unicorn:126:in `<top (required)>' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/bin/unicorn:23:in `load' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/bin/unicorn:23:in `<main>' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>' 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /resume-64845c436e75ac587deec98177291d4e.css?body=1 HTTP/1.1" 304 - 0.0139 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /welcome-64845c436e75ac587deec98177291d4e.css?body=1 HTTP/1.1" 304 - 0.0138 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /jquery-6a50177757f6c64493882fb7aae952c3.js?body=1 HTTP/1.1" 304 - 0.0148 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /bootstrap/affix-04c58ad484d0bdbdf9514b7d09505d25.js?body=1 HTTP/1.1" 304 - 0.0141 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET %2Fassets%2Fapplication-2e47777fcdd4d7b3353ccfc1718b4f0c.css?body=1 HTTP/1.1" 500 68784 0.0266 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /bootstrap/button-c9d4d44342d7be7abeb23fb0edbe00b7.js?body=1 HTTP/1.1" 304 - 0.0219 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /bootstrap/carousel-b0f1e7b56803d98d500f5ccc15d550e3.js?body=1 HTTP/1.1" 304 - 0.0150 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /bootstrap/alert-8186e091f2fa7c9423e9cadae6ce4de4.js?body=1 HTTP/1.1" 304 - 0.0258 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /bootstrap/collapse-417aacb8b3257798b481ed397b421b7c.js?body=1 HTTP/1.1" 304 - 0.0158 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /bootstrap/tab-dec75af9b2ffeed03dc43eabdb771d48.js?body=1 HTTP/1.1" 304 - 0.
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /bootstrap/dropdown-f5a24e96d563b9a6d252c1c07a6ecc6b.js?body=1 HTTP/1.1" 304 - 0.0142 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /bootstrap/modal-82015eda5031618c5aba3ebf9fc2cf4b.js?body=1 HTTP/1.1" 304 - 0.
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /bootstrap/transition-3005c626234d995c29e4bcbd07b3ac0c.js?body=1 HTTP/1.1" 304 - 0.0138 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /bootstrap/scrollspy-f421d662af4612a610656bfeee3407d9.js?body=1 HTTP/1.1" 304 - 0.0140 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /bootstrap-sprockets-99470846ba99b7073a929a36d4cee32a.js?body=1 HTTP/1.1" 304 - 0.0139 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /bootstrap/tooltip-5e9e765caafcbcb1672a3e72ef7f4a3a.js?body=1 HTTP/1.1" 304 - 0.0158 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /bootstrap/popover-df8ed104d2525bbc4b4dad060e68cf99.js?body=1 HTTP/1.1" 304 - 0.0211 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /jquery_ujs-03cb26c4b41579fc5e95ea8f47ac5e18.js?body=1 HTTP/1.1" 304 - 0.0148 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /turbolinks-ebcce04d6463d2d77b51c18291df6925.js?body=1 HTTP/1.1" 304 - 0.0162 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /about-32740fa4bc301ff5ef2eca5d8d82335a.js?body=1 HTTP/1.1" 304 - 0.0140 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /blog-32740fa4bc301ff5ef2eca5d8d82335a.js?body=1 HTTP/1.1" 304 - 0.0145 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /contact-32740fa4bc301ff5ef2eca5d8d82335a.js?body=1 HTTP/1.1" 304 - 0.0164 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /portfolio-32740fa4bc301ff5ef2eca5d8d82335a.js?body=1 HTTP/1.1" 304 - 0.0178 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /resources-32740fa4bc301ff5ef2eca5d8d82335a.js?body=1 HTTP/1.1" 304 - 0.0131 
17:07:13 web.1 | Rack::Lint::LintError: Content-Type header found in 304 response, not allowed 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/rack-1.6.0.beta/lib/rack/lint.rb:20:in `assert' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/rack-1.6.0.beta/lib/rack/lint.rb:651:in `block in check_content_type' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/rack-1.6.0.beta/lib/rack/lint.rb:647:in `each' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/rack-1.6.0.beta/lib/rack/lint.rb:647:in `check_content_type' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/rack-1.6.0.beta/lib/rack/lint.rb:58:in `_call' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/rack-1.6.0.beta/lib/rack/lint.rb:37:in `call' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/rack-1.6.0.beta/lib/rack/showexceptions.rb:24:in `call' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/rack-1.6.0.beta/lib/rack/commonlogger.rb:33:in `call' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/rack-1.6.0.beta/lib/rack/chunked.rb:54:in `call' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/rack-1.6.0.beta/lib/rack/content_length.rb:15:in `call' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:576:in `process_client' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:670:in `worker_loop' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:525:in `spawn_missing_workers' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:140:in `start' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/gems/unicorn-4.8.3/bin/unicorn:126:in `<top (required)>' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/bin/unicorn:23:in `load' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/bin/unicorn:23:in `<main>' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval' 
17:07:13 web.1 | /Users/fab/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>' 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /resume-32740fa4bc301ff5ef2eca5d8d82335a.js?body=1 HTTP/1.1" 304 - 0.0131 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET /welcome-32740fa4bc301ff5ef2eca5d8d82335a.js?body=1 HTTP/1.1" 304 - 0.0147 
17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] "GET %2Fassets%2Fapplication-c17db73b14421ee3a4d7e97bd3a6041c.js?body=1 HTTP/1.1" 500 68757 0.0217 

Ogni altra pagina ricarica ottengo 500 beni di errore interni non trovato:

GET http://localhost:5000/assets/application-ddb2488b062b582487dc9a71475f69b3.css?body=1 
GET http://localhost:5000/assets/application-89761eef2e06fafdfbe675623cff99d7.js?body=1 
+0

guardare la codifica lì - '% 2Fassets% 2Fa pplication-c17db73b14421ee3a4d7e97bd3a6041c.js' come stai richiedendo quel file? – sevenseacat

+0

@seven ma non è nel mio controllo. L'ho visto. Questo succede su ogni altra pagina ricaricata. Qualcosa sta spazzando. Cosa posso fare per forzare la codifica corretta? – fyz

+0

ha incontrato lo stesso problema. –

risposta

2

Sì, sembra essere un bug (o no?). Quando le attività sono stati precompilati con:

RAILS_ENV=production bin/rake assets:precompile 

e in config/environments/development.rb:

config.assets.digest = true 

com'è true di default c'è in Rails 4.2 (Release Notes, Pull Request), sarà sempre questo bug in ambiente di sviluppo, non importa quale server usi (lo sto trovando sia su WEBrick che su Thin). A quanto mi risulta, si cerca di ottenere beni precompilate da /public/assets, ma non riesce a causa di

Content-Type intestazione trovata in 304 risposta, non ha permesso

o qualcosa di simile.

Si potrebbe evitare questo comportamento con la pulizia /public/assets ogni volta che si avvia lo sviluppo di:

bin/rake assets:clobber 

o disattivando digest di asset in config sviluppo:

config.assets.digest = false 

o disattivando le attività statiche che servono in sviluppo config:

config.assets.digest = true 
config.serve_static_assets = false 
+0

Questo mi ha colpito con i binari rilasciati 4.2. È stato inoltrato un bug su questo bugme666? 'config.assets.digest = false' ha usato le normali risorse di sviluppo piuttosto che quelle nella cartella pubblica. – user1116573

+0

@ user1116573 No, mi dispiace, non ho inviato. – gpchelkin