【问题标题】:Heroku rails app (text_area bug)Heroku rails 应用程序(text_area 错误)
【发布时间】:2013-03-08 05:02:48
【问题描述】:

在本地主机上好吧... 但是在 heroku 中,我不能在“about”中添加超过 255 个字符。

heroku 错误

We're sorry, but something went wrong.

_form.html.erb

<%= f.label :about %>
<%= f.text_area :about %>

show.html.erb

<p><%= @release.about %></p>

谢谢!

【问题讨论】:

  • Heroku 日志针对此错误显示什么?

标签: text heroku area


【解决方案1】:

在您的数据库中是否定义为string?要超过 255 个字符,它需要是 text。原因是 Heroku 使用 Postgres,strings 不能超过 255 个字符,而 sqlite 允许。

【讨论】:

    猜你喜欢
    • 2016-04-01
    • 2014-11-19
    • 2014-03-12
    • 2015-10-31
    • 2013-05-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多