开发者

Omniauth in Rails 3.1.rc4

I'm using the latest release of rails, starting a new app that I will be deploying in 3.1 once its out, and I cannot get omniauth to work. If I just add omniauth to my Gemfile, it bundles up, but when I then run rake, or rails s, or pretty much any command, it errors out:

no s开发者_运维技巧uch file to load -- omniauth/password

Any ideas why? Is there a branch or fork that works on Rails 3.1? Or is this just me that's having this issue?


The actual issue is that bundler chooses an old version of omniauth. To help bundler choose the right version, use:

gem 'omniauth', '>= 0.2.6'


I found a post by the maintainer regarding rails 3.1 (roughly 2 weeks ago):

For an Omniauth and Mongoid example app that works with Rails 3.1, use the application template in the repo https://github.com/RailsApps/rails3-application-templates to generate a new app. I recently updated the application template to create a Rails 3.1 app and it's been tested. I'll be updating the example app repo in the next few days.

Seems like you can probably use the referenced generator to generate everything you need to get Omniauth / Rails 3.1 working together.


If gem 'omniauth', '>=0.2.6' conflicts with other gems, (the version of nokigiri is too low in this version) than install omniauth from github. So in your gemfile put:

gem 'omniauth', :git => 'git://github.com/intridea/omniauth.git'

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜