RoR omniauth and facebooker2

309 Views Asked by At

In a new application Rails 3.1 with only in Gemfile:

gem "omniauth" gem "facebooker2"

bundle install give the error:

Bundler could not find compatible versions for gem "hashie": In Gemfile: facebooker2 (= 0.0.16) ruby depends on hashie (~> 1.1.0) ruby

omniauth (>= 0) ruby depends on
  hashie (1.2.0)

How can I install facebooker2 with omniauth?

2

There are 2 best solutions below

0
David Sedeño On BEST ANSWER

The only way I have to solve the problem was to clone the mogli project and update the hashie dependence to 1.2:

https://github.com/davidsf/mogli/commit/bcee3dd815bab7c8eb68511ee0d7c2da39115e14

1
Gazler On

I just ran bundle with those 2 gems and it worked.

It did install facebooker2 0.0.12 however, and not 0.0.16

gem 'omniauth', '1.0.2'
gem 'facebooker2'

it also worked without specifying the omniauth version, but I highly recommend using the a 1.0.0 release as there are huge differences. The main one being all the providers are now in their own gems.

If bundle install doesn't work, run bundle update.

The relevant sections of my Gemfile.lock:

facebooker2 (0.0.12)
  mogli (>= 0.0.12)
  ruby-hmac
hashie (1.2.0)
hike (1.2.1)
httparty (0.8.1)
  multi_json
  multi_xml
...
mogli (0.0.28)
  httparty (>= 0.4.3)
omniauth (1.0.2)
  hashie (~> 1.2)
  rack