jasonpgignac
jasonpgignac

Reputation: 2306

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 such 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?

Upvotes: 5

Views: 1966

Answers (3)

Chris Slade
Chris Slade

Reputation: 8225

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'

Upvotes: 5

Michael Reinsch
Michael Reinsch

Reputation: 579

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'

Upvotes: 22

Brett Bender
Brett Bender

Reputation: 19738

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.

Upvotes: 5

Related Questions