Ruby on rails Authlogic在Heroku上抛出错误
是的,我读过 这是我在production.log中得到的信息:Ruby on rails Authlogic在Heroku上抛出错误,ruby-on-rails,authlogic,heroku,Ruby On Rails,Authlogic,Heroku,是的,我读过 这是我在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,
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 />
我得到:
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">
无论是在开发模式还是生产模式方面,当地的一切都运转良好。我的应用程序中有一个.gems文件,当我第一次推到Heroku时,它似乎安装了AuthLogic和曲别针
难倒了。谢谢。啊,与.gitignore文件中的许多内容有关。在推到Heroku之前应该清除它。听起来你解决了它,但是有了这样的问题,我发现它很方便,请重新启动Heroku
例如,使用heroku rake db:migrate运行迁移后,需要重新启动应用程序才能看到这些新列。而不是
db:reset
尝试db:migrate VERSION=0
和db:migrate
我认为他们在重置时遇到了问题,因为它试图删除db。
另外,您不需要把
RAILS\u ENV=production
作为默认的AFAIK…我也遇到了同样的问题。我重新启动了heroku,它运行得很好。顺便说一句,authlogic在heroku遇到了麻烦,我不得不先把版本信息放在.gems中,后来又出现了另一个问题,所以我只是把它作为插件安装……这是我遇到同样问题时的关键。干杯“heroku重启”是为meAwesome修复的。省去了我很多麻烦。谢谢
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)