Oauth 与 Windows 上的 Rails 项目集成
我一直在遵循指南< /a> 将 oauth 插件与我的 Rails 项目集成。我在窗户上工作。
到目前为止,我已经使用以下代码安装了 Oauth gem 和 Oauth-plugin gem:
gem install oauth
gem install oauth-plugin
两者均已成功完成。然后它说运行以下代码:
./script/generate oauth_consumer --haml
这不起作用,可能是因为我使用的是 Rails 3.1,所以我运行:
rails generate oauth_consumer --haml
它返回以下消息:
找不到生成器 auth_consumer
有什么想法我错过了吗?我有点迷路了,找不到更好的指南。
更好的指南也会有所帮助......
I've been following a guide to integrate the oauth plugin with my rails project. I'm working in windows.
So far I have installed the Oauth gem and the Oauth-plugin gem using the following code:
gem install oauth
gem install oauth-plugin
both of which have completed successfully. It then says to run the following code:
./script/generate oauth_consumer --haml
which doesn't work, probably since I'm using rails 3.1 so instead I ran:
rails generate oauth_consumer --haml
which returns the following message:
could not find generator auth_consumer
Any ideas what I'm missing? I'm kind of lost and cannot find a better guide.
a better guide would also help...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您对实现不太了解,我可以指导您进行更好的设置,该设置使用最流行的 Devise 身份验证 gem 以及 oauth gem。我已经在几个项目中使用了 devise,它确实是目前 Rails 可用的最佳身份验证选项。 Devise 通过一些配置原生支持 Oauth。我发现这个教程可能对您有帮助:
http:// /www.railsatwork.com/2010/10/implementing-oauth-provider-part-1.html
使用 devise :omniauthable 设置多个提供程序
If you are not too far along with your implementation I can guide you to a better setup which uses the most popular Devise authentication gem along with the oauth gem. I've used devise for a few projects and it truly is the best authentication option available for Rails at the moment. Devise supports Oauth natively with some configuration. I found this tutorial which might help you:
http://www.railsatwork.com/2010/10/implementing-oauth-provider-part-1.html
Setup multiple providers with devise :omniauthable