【发布时间】:2017-01-22 20:10:46
【问题描述】:
我刚刚将我的应用部署到 Heroku,我遇到了这个问题。在注册页面:
<div class="field">
<%= f.label :bio %><br />
<%= f.text_field :bio %>
</div>
在日志中
ActionView::Template::Error (undefined method `bio' for #<User:0x007f5e772493c0>):
<div class="field">
<%= f.label :bio %><br />
<%= f.text_field :bio %>
</div>
对此有什么想法吗?谢谢 附言。用于部署之前工作正常
编辑
我尝试迁移,但出现此错误
Couldn't create database for {"adapter"=>"sqlite3", "pool"=>5, "timeout"=>5000, "database"=>"db/test.sqlite3"}
Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
【问题讨论】:
标签: ruby-on-rails postgresql ruby-on-rails-4 heroku