如何在 rails 3 中安装 restful 身份验证插件? [英] How exactly do I install restful authentication plugin in rails 3?

查看:55
本文介绍了如何在 rails 3 中安装 restful 身份验证插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 rails 3 上的这个 restful 身份验证插件感到非常困惑.我尝试使用以下命令安装该插件.它告诉我它已经安装,然后我尝试使用 --force 重新安装这个插件,它告诉我找不到插件

I'm very confused on this restful authentication plugin on rails 3. I tried to install the plugin using the following command. It tells me it's already installed, then I tried to use the --force to reinstall this plugin it tells me that the plugin not found

因此,如果插件已经安装,为什么在我尝试运行命令 rails g 已验证的用户会话 --include-activationCould not find generator authentication>

So if the plugin is already installed why do I get error Could not find generator authenticated when I try to run the command rails g authenticated user sessions --include-activation

有什么想法吗?

C:\Users\Jonathan\Documents\blog>rails plugin install http://github.com
/technoweenie/restful-authentication.git restful_authentication
already installed: restful-authentication (http://github.com/technoweenie/restfu
l-authentication.git).  pass --force to reinstall
already installed: restful_authentication (restful_authentication).  pass --forc
e to reinstall

C:\Users\Jonathan\Documents\blog>rails plugin install http://github.com
/technoweenie/restful-authentication.git restful_authentication --force
Plugin not found: ["http://github.com/technoweenie/restful-authentication.git",
"restful_authentication"]

C:\Users\Jonathan\Documents\blog>rails g authenticated user sessions --
include-activation
Could not find generator authenticated.

更新:这是运行gem list

抽象 (1.0.0)actionmailer (3.0.1, 3.0.0)动作包(3.0.1、3.0.0)活动模型(3.0.1、3.0.0)活动记录 (3.0.1, 3.0.0)活动资​​源 (3.0.1, 3.0.0)主动支持 (3.0.1, 3.0.0)可寻址 (2.2.2)海尔 (1.0.1)bcrypt-ruby (2.1.2)建造者 (2.1.2)捆绑器 (1.0.3)设计 (1.1.3)erubis (2.6.6)法拉第 (0.4.6)gem_plugin (0.2.3)混帐(1.2.5)i18n (0.4.2, 0.4.1)邮件 (2.2.9, 2.2.7)哑剧类型 (1.16)小测试 (1.6.0)杂种 (1.2.0.pre2 x86-mingw32)multi_json (0.0.4)网络 LDAP (0.1.1)漂亮的发电机(0.4.2、0.4.1)nokogiri (1.4.3.1 x86-mingw32)oa-基本 (0.1.5, 0.1.4)OA 核心 (0.1.5, 0.1.4)oa-企业 (0.1.5, 0.1.4)oa-oauth (0.1.5, 0.1.4)oa-openid (0.1.5, 0.1.4)oauth (0.4.3)oauth2 (0.0.13)omn​​iauth (0.1.5, 0.1.4)多语言 (0.3.1)pyu-ruby-sasl (0.0.3.2)机架 (1.2.1)机架安装 (0.6.13)机架openid (1.1.2)机架测试 (0.5.6)导轨 (3.0.1, 3.0.0)栏杆 (3.0.1, 3.0.0)耙子 (0.8.7)折扣 (1.6.5)文档 (2.5.8)休息客户端(1.6.1)ruby-openid (2.1.8)ruby-openid-apps-discovery (1.2.0)rubyntlm (0.1.1)sqlite3-ruby (1.3.1 x86-mingw32, 1.2.5 x86-mingw32)雷神 (0.14.3)树梢 (1.4.8)tzinfo (0.3.23)典狱长 (0.10.7)

abstract (1.0.0) actionmailer (3.0.1, 3.0.0) actionpack (3.0.1, 3.0.0) activemodel (3.0.1, 3.0.0) activerecord (3.0.1, 3.0.0) activeresource (3.0.1, 3.0.0) activesupport (3.0.1, 3.0.0) addressable (2.2.2) arel (1.0.1) bcrypt-ruby (2.1.2) builder (2.1.2) bundler (1.0.3) devise (1.1.3) erubis (2.6.6) faraday (0.4.6) gem_plugin (0.2.3) git (1.2.5) i18n (0.4.2, 0.4.1) mail (2.2.9, 2.2.7) mime-types (1.16) minitest (1.6.0) mongrel (1.2.0.pre2 x86-mingw32) multi_json (0.0.4) net-ldap (0.1.1) nifty-generators (0.4.2, 0.4.1) nokogiri (1.4.3.1 x86-mingw32) oa-basic (0.1.5, 0.1.4) oa-core (0.1.5, 0.1.4) oa-enterprise (0.1.5, 0.1.4) oa-oauth (0.1.5, 0.1.4) oa-openid (0.1.5, 0.1.4) oauth (0.4.3) oauth2 (0.0.13) omniauth (0.1.5, 0.1.4) polyglot (0.3.1) pyu-ruby-sasl (0.0.3.2) rack (1.2.1) rack-mount (0.6.13) rack-openid (1.1.2) rack-test (0.5.6) rails (3.0.1, 3.0.0) railties (3.0.1, 3.0.0) rake (0.8.7) rdiscount (1.6.5) rdoc (2.5.8) rest-client (1.6.1) ruby-openid (2.1.8) ruby-openid-apps-discovery (1.2.0) rubyntlm (0.1.1) sqlite3-ruby (1.3.1 x86-mingw32, 1.2.5 x86-mingw32) thor (0.14.3) treetop (1.4.8) tzinfo (0.3.23) warden (0.10.7)

推荐答案

Restful 身份验证在 rails 3 中不再是 100% 工作.它有一些问题要适应 rails 3.x.尝试使用 Authlogic 或实际上设计"应该被证明是一个很棒的身份验证系统,尤其是对于 Rails 3.x.我为我的应用程序使用了设计,并且效果很好!!!

Restful authentication is no more 100% working in rails 3. It has some issues to fit in rails 3.x. Try using Authlogic or in fact "devise" should prove to be a great authentication system especially for Rails 3.x.I use devise for my apps and it works great !!!

这篇关于如何在 rails 3 中安装 restful 身份验证插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆