链轮误差

发布于 2024-12-02 17:31:06 字数 1701 浏览 1 评论 0原文

当我将 Rails 3.1 版本用于我的 Rails 应用程序时。我收到这个错误

    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/action_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'

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/action_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'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

自在安然 2024-12-09 17:31:06

还可以更改默认资源路径,

config.assets.prefix = "/some_other_path"

请参阅:更改资源路径

there is also a possibility to change the default assets Path

config.assets.prefix = "/some_other_path"

see: Changing the assets Path

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文