gpt4 book ai didi

ruby-on-rails - Heroku rails-problems((语法错误,意外的 ',',在 textarea-form-helper 中期望 ')')

转载 作者:太空宇宙 更新时间:2023-11-03 18:25:38 24 4
gpt4 key购买 nike

我正在尝试将我的 Rails 应用程序推送到 heroku cedar-stack 上。在我的本地机器上一切正常(Ruby 版本 1.9.3 和 rails 版本 3.2.6)

当我将我的应用程序推送到 heroku 时,我在 _post_form-partial 中收到以下错误(请参阅下面的代码):

/app/app/views/posts/_post_form.html.erb:9: syntax error, unexpected ',', expecting ')'
2012-07-18T11:25:36+00:00 app[web.1]: ...:id =>"textarea", :cols => "5", :rows => "8", :class => "inp...
2012-07-18T11:25:36+00:00 app[web.1]: ... ^
2012-07-18T11:25:36+00:00 app[web.1]: /app/app/views/posts/_post_form.html.erb:9: syntax error, unexpected ',', expecting ')'
2012-07-18T11:25:36+00:00 app[web.1]: ...a", :cols => "5", :rows => "8", :class => "inputx-large boxs...
2012-07-18T11:25:36+00:00 app[web.1]: ... ^
2012-07-18T11:25:36+00:00 app[web.1]: /app/app/views/posts/_post_form.html.erb:9: syntax error, unexpected ')', expecting keyword_end
2012-07-18T11:25:36+00:00 app[web.1]: ... => "inputx-large boxsizing") );@output_buffer.safe_concat('
2012-07-18T11:25:36+00:00 app[web.1]: ... ^):

我真的不明白这里的问题。我做错了什么?

<div id="inputfield_visible_wrapper">
<div class="well">
<input type="text" id="inputfield_visible" class="input-xlarge boxsizing" value="Create Posting here">
</div>
</div>
<div id="form_hidden_wrapper">
<%= form_for Post.new, :html => { :class => "well" } do |f| %>
<%= render "shared/posting_information" %>
<%= f.text_area (:content, :id =>"textarea", :cols => "5", :rows => "8", :class => "inputx-large boxsizing") %>
<%= f.submit "Post", :disabled => true, :id => "submit_button", :class => "btn btn-primary" %>
<%= submit_tag "Cancel", :class => "btn", :id => "cancel_button", :type => "button" %>
<div class="characters_left_wrapper">
<span id="characters_left">100</span> <span class="hidden-phone">Characters left</span>
</div>
<div class="clear"></div>
<% end %>
</div>

最佳答案

不要在括号前的方法上放置尾随空格:

<%= f.text_area (:content) %>

不好

<%= f.text_area(:content) %>

关于ruby-on-rails - Heroku rails-problems((语法错误,意外的 ',',在 textarea-form-helper 中期望 ')'),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11540289/

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