gpt4 book ai didi

ruby-on-rails - 框架应用程序中带有 rails 3.2.0.rc1 stylesheet_link_tag 的 ArgumentError

转载 作者:行者123 更新时间:2023-12-04 06:02:52 25 4
gpt4 key购买 nike

我创建了一个新的 rails 3.2.0.rc1 应用程序并生成了一个带有索引操作的欢迎 Controller 。我修复了路由,以便根指向此操作,并删除了 index.html 占位符文件。当我尝试加载根页面时,我收到与welcome.css.scss 和application.html.erb 中的stylesheet_link_tag 行相关的错误“参数数量错误(2 个3)”。如果我将welcome.css.scss 文件重命名为welcome.css,页面加载正常。

我是否错过了候选发布版的特殊配置步骤?我正在使用 ruby 1.9.2。

谢谢。

最佳答案

我在 1.9.3-p0 上的 3.2rc1 也遇到了同样的情况

Started GET "/" for 127.0.0.1 at 2012-01-08 21:18:59 -0800
Processing by HomeController#index as HTML
Rendered home/index.html.erb within layouts/application (3.5ms)
Completed 500 Internal Server Error in 81ms

ActionView::Template::Error (wrong number of arguments (3 for 2)
(in /Users/dan/Sites/appname/app/assets/stylesheets/home.css.scss)):
2: <html>
3: <head>
4: <title>Appname</title>
5: <%= stylesheet_link_tag "application" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
8: </head>
app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb__3426015066428469059_70355741377500'


Rendered /Users/dan/.rbenv/versions/1.9.3-rc1/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (9.5ms)
Rendered /Users/dan/.rbenv/versions/1.9.3-rc1/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.6ms)
Rendered /Users/dan/.rbenv/versions/1.9.3-rc1/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (15.2ms)

我的 home.css.scss 如下
// Place all the styles related to the home controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

关于ruby-on-rails - 框架应用程序中带有 rails 3.2.0.rc1 stylesheet_link_tag 的 ArgumentError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8732835/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com