对于rails 3上的restful身份验证插件,我非常困惑。我尝试使用以下命令安装插件。它告诉我它已经安装了,然后我尝试使用--force重新安装这个插件,它告诉我插件没有找到
那么,如果插件已经安装好了,那么当我尝试运行命令Could not find generator authenticated时,为什么要获得错误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) 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)( 3.0.0)可寻址(2.2.2) arel (1.0.1) bcrypt-ruby (2.1.2) builder (2.1.2) bundler (1.0.3)设计(1.1.3) erubis (2.6.6) faraday (0.4.6) git (0.2.3) git (1.2.5) i18n (0.4.2,0.4.1)邮件(2.2.9,2.2.7 mime-类型(1.16)最小(1.6.0) mongrel (1.2.0.pre2x86-mingw32) multi_json (0.0.4) net-ldap (0.1.1)漂亮-生成器(0.4.2,0.4.1) nokogiri (1.4.3.1 x86-mingw32) a-基本(0.1.5,0.1.4) oa-核心(0.1.5,0.1.4) oa-企业(0.1.5,0.1.5,0.1.4)( 0.1.4) oa-oauth (0.1.5,0.1.4) openid (0.1.5,0.1.4) oauth (0.4.3) oauth2 (0.0.13)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)rdoc (2.5.8) rest-客户端(1.6.1)红宝石-openid (2.1.8) ruby-openid -应用程序-发现(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)
发布于 2010-10-29 03:28:17
Restful身份验证在rails 3中不再是100%的,它在rails 3.x中存在一些问题。尝试使用Authlogic,或者实际上" devise“应该被证明是一个很棒的身份验证系统,特别是对于Rails 3.x,我使用了devise我的应用程序,它工作得很好!
发布于 2013-02-26 09:53:18
对于rails 3的支持,您可以使用gem "rails3-restful-authentication“、"~> 3.0.1”。我做了几个补丁来使它与rails 3一起工作。
https://stackoverflow.com/questions/4038307
复制相似问题