stylesheet_link_tag
和javascript_include_tag
已停止工作
日志
Started GET "/urls/604" for 77.88.42.27 at Mon Nov 21 11:00:20 +0200 2011
Processing by UrlsController#show as */*
Parameters: {"id"=>"604", "collection"=>{"tag_suggestions"=>:get}}
Url Load (0.8ms) SELECT `urls`.* FROM `urls` WHERE `urls`.`id` = ? LIMIT 1 [["id", "604"]]
Comment Load (0.9ms) SELECT `comments`.* FROM `comments` WHERE (is_active = 1 AND url_id = '604') ORDER BY created_at DESC
Rendered shared/_comments.html.erb (0.0ms)
Rendered urls/show.html.erb within layouts/application (57.6ms)
Compiled global.css (0ms) (pid 28092)
Completed 500 Internal Server Error in 663ms
ActionView::Template::Error (wrong number of arguments (2 for 1)):
19: -->
20:
21:
22: <%= stylesheet_link_tag 'global' %>
23: <%= javascript_include_tag 'jquery-1.6.4.min.js' %>
24: <%= javascript_include_tag 'jquery.corner.js' %>
25: <%= csrf_meta_tag %>
app/views/layouts/application.html.erb:22:in `_app_views_layouts_application_html_erb___1824233644_17244817840'
我如何解决这个问题?
答案 0 :(得分:1)
你的CSS文件有效吗?可能是那里的东西(可能是旧的浏览器黑客或类似的非标准语法)绊倒了Sprockets。
您可能会发现这对于了解Rails 3如何管理CSS / JS http://guides.rubyonrails.org/asset_pipeline.html
非常有用答案 1 :(得分:0)
将表单Rails 3.0移动到Rails 3.1后,我们看到了这个错误。我们的问题是我们在application_helper.rb中有一个名为asset_path的帮助器。 asset_path对Rails 3.1至关重要,我们无意中重写了它。