当我在本地运行它时,我在rails应用程序中收到以下错误:
ActionView::Template::Error (wrong number of arguments (2 for 1)): 8: %link{href: "/assets/favico.png", rel: "icon"}/ 9: %link{href: "https://fonts.googleapis.com/css?family=Open+Sans:400,700", rel: "stylesheet", type: "text/css"}/ 10: = stylesheet_link_tag "application", :media => "all" 11: = javascript_include_tag "application" 12: = csrf_meta_tags 13: = yield(:head) app/views/layouts/application.html.haml:10:in `_app_views_layouts_application_html_haml___410024948890833714_70223805533300'
我已经在heroku上部署了应用程序,没有任何问题.我从rails3更新到rails 4后,最近出现了此问题.
手动添加标签而不是使用帮助程序的工作原理:
%link{href: "/assets/application.css", media: "screen", rel: "stylesheet"}/ %script{src: "/assets/application.js"}
mountriv99.. 21
我假设您正在使用链轮2.12.0,如果是这种情况,请根据https://github.com/sstephenson/sprockets/issues/540将其降级到2.11.0
我假设您正在使用链轮2.12.0,如果是这种情况,请根据https://github.com/sstephenson/sprockets/issues/540将其降级到2.11.0