0
從3.1.1 Rails升級到3.2.8時,看到樣式表和圖像的路由錯誤真的令人沮喪。嘗試了「捆綁EXEC軌服務器」命令,也嘗試了在文件中添加寶石一個接一個,沒有工作過:(資產的路由錯誤升級Rails 3.1時的Rails 3.2.8
ActionController::RoutingError (No route matches [GET] "/stylesheets/application.css"):
actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.8) lib/rails/rack/logger.rb:26:in `call_app'
railties (3.2.8) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.8) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.1) lib/rack/lock.rb:15:in `call'
actionpack (3.2.8) lib/action_dispatch/middleware/static.rb:62:in `call'
railties (3.2.8) lib/rails/engine.rb:479:in `call'
railties (3.2.8) lib/rails/application.rb:223:in `call'
rack (1.4.1) lib/rack/content_length.rb:14:in `call'
railties (3.2.8) lib/rails/rack/log_tailer.rb:17:in `call'
rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'
<%= javascript_include_tag 「應用程序」 %> <%= csrf_meta_tags%> <%= stylesheet_link_tag '藍圖/屏幕',:媒體=> '屏幕' %> <%= stylesheet_link_tag '藍圖/打印' ,:media =>'print'%> <%= stylesheet_link_tag「application」%> <%= stylesheet_link_tag「st art/jquery-ui-1.8.16.custom.css「%> 這是如何在我的application.html.erb,在軌道上運行良好3.1 – user1069240 2012-08-13 06:58:54
好吧,我更新了一些更多的信息的答案。我在這裏猜測你在'public/assets'中有文件。也有可能是這些文件中的一些文件具有硬編碼的鏈接,儘管很難想象該鏈接是針對application.css的。 – 2012-08-13 08:08:55
我把這個交給了寶石檔案'group:assets do gem'sass-rails','〜> 3.2.3' gem'coffee-rails','〜> 3.2.1' gem'uglifier',' > = 1.0.3' end' 刪除「group:assets do」工作 – user1069240 2012-08-13 10:04:17