开发者

sprockets error

开发者 https://www.devze.com 2023-03-31 17:53 出处:网络
when i use rails 3.1 version for my rails application . i got this error Routing Error No route matches {:action=>\"show\", :controller=>\"assets\", :id=>#<Sprockets::BundledAsset:0xa821

when i use rails 3.1 version for my rails application . i got this error

    Routing Error

    No route matches {:action=>"show", :controller=>"assets", :id=>#<Sprockets::BundledAsset:0xa82189fc pathname="/Users/Apple/workplace/shop-3.1/app/assets/stylesheets/application.css", mtime=2011-08-30 22:34:42 +0800, digest="f4f1e8a7a49e8c6b1273daf5b61a1028">, :format=>"css", nil=>:request}

this is the error stack
actionpack (3.1.0.rc8) lib/action_dispatch/routing/route_set.rb:464:in raise_routing_error'
actionpack (3.1.0.rc8) lib/action_dispatch/routing/route_set.rb:454:ingenerate'
actionpack (3.1.0.rc8) lib/action_dispatch/routing/route_set.rb:493:in generate'
actionpack (3.1.0.rc8) lib/action_dispatch/routing/route_set.rb:518:inurl_for'
actionpack (3.1.0.rc8) lib/acti开发者_如何学运维on_dispatch/routing/url_for.rb:143:in url_for'
actionpack (3.1.0.rc8) lib/action_view/helpers/url_helper.rb:107:inurl_for'
actionpack (3.1.0.rc8) lib/action_dispatch/routing/route_set.rb:200:in asset_path'
actionpack (3.1.0.rc8) lib/sprockets/helpers/rails_helper.rb:58:inblock in stylesheet_link_tag'
actionpack (3.1.0.rc8) lib/sprockets/helpers/rails_helper.rb:48:in collect'
actionpack (3.1.0.rc8) lib/sprockets/helpers/rails_helper.rb:48:instylesheet_link_tag'
actionpack (3.1.0.rc8) lib/sprockets/helpers/rails_helper.rb:51:in block (2 levels) in stylesheet_link_tag'
actionpack (3.1.0.rc8) lib/sprockets/helpers/rails_helper.rb:50:inmap'
actionpack (3.1.0.rc8) lib/sprockets/helpers/rails_helper.rb:50:in block in stylesheet_link_tag'
actionpack (3.1.0.rc8) lib/sprockets/helpers/rails_helper.rb:48:incollect'
actionpack (3.1.0.rc8) lib/sprockets/helpers/rails_helper.rb:48:in `stylesheet_link_tag'


there is also a possibility to change the default assets Path

config.assets.prefix = "/some_other_path"

see: Changing the assets Path

0

精彩评论

暂无评论...
验证码 换一张
取 消