ruby-on-rails – Heroku上的Authlogic抛出错误
发布时间:2020-12-17 04:31:20 所属栏目:百科 来源:网络整理
导读:是的,我读过 this. 这是我在我的production.log中得到的: ActionView::TemplateError (undefined method `password' for #User:0x2b0ddb58cdc0) on line #11 of app/views/users/new.html.erb:8: /p9: p10: %= f.label :password,"Password:" %br /11: %= f
是的,我读过
this.
这是我在我的production.log中得到的: ActionView::TemplateError (undefined method `password' for #<User:0x2b0ddb58cdc0>) on line #11 of app/views/users/new.html.erb: 8: </p> 9: <p> 10: <%= f.label :password,"Password:" %><br /> 11: <%= f.password_field :password %> 12: </p> 13: <p> 14: <%= f.label :password_confirmation,"Password again:" %><br /> 当我尝试: $heroku rake db:reset RAILS_ENV=production 我明白了: yeqynzfiku already exists (in /disk1/home/slugs/109616_e6df6f2_8837/mnt) Couldn't drop yeqynzfiku : #<ActiveRecord::StatementInvalid: PGError: ERROR: must be owner of database yeqynzfiku : DROP DATABASE IF EXISTS "yeqynzfiku"> 我不知道这意味着什么.我也试过了 $heroku rake db:reset $heroku rake db:migrate RAILS_ENV=production $heroku rake db:migrate $heroku rake gems:install (for what it's worth) 在开发和生产模式下,一切都在本地运行良好.我的应用程序中有一个.gems文件,当我第一次推送到Heroku时,似乎安装了AuthLogic和Paperclip就好了. 难住了.谢谢. 解决方法
听起来你解决了它,但是有了这样的问题我发现它很方便做了一次heroku重启.
例如,在使用heroku rake db:migrate运行迁移之后,需要重新启动应用程序才能看到这些新列. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |