我有一個類似的問題this question,但沒有任何解決方案都爲我工作。的ActionController :: RoutingError在Rails的開發環境
在我的Rails 4.0.3應用程序,我一直得到以下錯誤:
ActionController::RoutingError (No route matches [GET] "/assets/javascripts/underscore-min.map")
vendor/bundle/ruby/2.1.0/gems/actionpack-4.0.3/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.0.229/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
vendor/bundle/ruby/2.1.0/gems/actionpack-4.0.3/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.0.229/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
我也偶爾會試圖加載其他資產(圖片等)時,得到類似的錯誤,但並不適用於所有圖片;這是最一致的。在我的本地服務器上,在開發環境中發生此問題。
我試過在我的development.rb文件中設置config.serve_static_assets = true
,以及在有Rails版本問題的情況下設置config.serve_static_files
。我也試過運行rake assets:precompile
。
如果有人有任何想法,我將不勝感激!
請讓我們知道到底哪個文件導致此錯誤。 –
或者顯示在你的視圖中嵌入圖像的代碼。 –
我已經爲這個錯誤添加了堆棧跟蹤的前幾行......這有幫助嗎? –