0
我刚部署我的应用程序到Heroku,我面临着这个问题。在注册页面:为未定义的方法`生物'继续获取未识别的方法'字段'#<User:>
<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>
对这个有什么想法?谢谢 Ps。用于部署之前做工精细
编辑
我试图迁移,但我得到这个错误
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).
上
运行此命令,现在我越来越宝石:: LoadError:指定“sqlite3的”数据库适配器,但没有加载宝石。将'gem'sqlite3''添加到您的Gemfile中(并确保其版本处于ActiveRecord所要求的最低限度)。 –
尝试在开发中移动'“sqlite3”'和在生产中移动''pg“' –
它在一段时间后出于某种原因 –