0

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?

David Sedeño
  • 495
  • 1
  • 6
  • 19

2 Answers2

0

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
Gazler
  • 83,029
  • 18
  • 279
  • 245
  • The problem is that facebooker2 0.0.12 is not compatible with Rails 3.1: https://github.com/mmangino/facebooker2/pull/55 – David Sedeño Jan 31 '12 at 19:16
0

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

David Sedeño
  • 495
  • 1
  • 6
  • 19