Rails3:无法在Rails3中安装forget_password插件
我在我的Rails3应用程序中使用restful_authentication插件,现在尝试安装forget_password插件来使用它,安装插件没有问题,一切都非常顺利,但我似乎无法生成forget_password。
我被告知在安装忘记密码插件后运行以下命令:
ruby script/generate forgot_password password user
但由于我使用Rails3,我运行了上面的命令,如下所示:
rails generate forgot_password password user
但它总是因错误而退出:
Could not find generator forgot_password.
哦,还有一件事,实际命令如下所示:
ruby script/generate forgot_password <password-model-name> <user-model-name>
可以有人告诉我密码模型名称的用途吗,我的意思是我只有一个用户模型,而没有密码模型,那么我该怎么办,
感谢您的帮助。 。
I am using restful_authentication plugin in my Rails3 app and now in trying to install forgot_password plugin to work with it, there was no problem installing the plugin that all went pretty smooth but i can't seem to generate forgot_password.
I was told to run the following command after I install the forgot_password plugin:
ruby script/generate forgot_password password user
but since im using Rails3 i ran the above command like this:
rails generate forgot_password password user
but it always quits with the error:
Could not find generator forgot_password.
oh and one more thing, the actual command looks like this:
ruby script/generate forgot_password <password-model-name> <user-model-name>
Can anyone tell me what that password-model-name is for, i mean i only have a model for user i don't have one for password then what am i suppose to do,
thanks for any help..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
虽然我不确定,但看起来它可能是您尝试在 Rails 3 应用程序上运行的 Rails 2 插件。我会检查供应商/插件目录,看看是否可以找到任何生成器,以及是否可以将它们复制并粘贴到 lib/generators/ 或 lib/rails_generators/ 中,因为这就是我所阅读的 Rails 3 的位置。如果它们不存在,那就是你的问题。更不用说我上次检查 Rails 3 使用的命令:
而不生成
这部分之后的语法相同。
While I am not sure, it looks like it may be a Rails 2 plugin you are trying to run on a Rails 3 app. I would check the vendor/plugin directory to see if you can find any generators and if you can copy and paste them to lib/generators/ or lib/rails_generators/, as that is where Rails 3 may look as I have come to read. If they don't exists there is your problem. Not to mention last time I checked Rails 3 uses the command:
and not
With the same syntax after this part.