How exactly do I install restful authentication plugin in rails 3?

 ̄綄美尐妖づ 提交于 2019-12-10 10:29:05

问题


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

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

any ideas?

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.

Update: here is the output after run gem list

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)


回答1:


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 !!!




回答2:


you can use gem "rails3-restful-authentication", "~> 3.0.1" for rails 3 support. I have done few patches to make it working with rails 3



来源:https://stackoverflow.com/questions/4038307/how-exactly-do-i-install-restful-authentication-plugin-in-rails-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!