tzinfo conflict with mongoid and rufus-scheduler

226 views Asked by At

I try to use mongoid 3.x together with rufus-scheduler 2.x and im always getting a gem conflict over tzinfo.

Unable to activate mongoid-3.1.4, because tzinfo-1.0.1 conflicts with tzinfo (~> 0.3.22)

Looks like mongoid has some dependency on some legacy tzinfo version.

How can I solve this problem?

1

There are 1 answers

2
jmettraux On BEST ANSWER

In your Gemfile, specify the version of TzInfo that suits Mongoid, before Mongoid and before rufus-scheduler (rufus-scheduler accepts any version of TzInfo).

source 'https://rubygems.org'

gem 'tzinfo', '0.3.22'
gem 'mongoid', '3.1.4'
gem 'rufus-scheduler'

UPDATE

Updated rufus-scheduler 2.0.x so that it accepts >= 0.3.22 (https://github.com/jmettraux/rufus-scheduler/commit/18c98010)

Unfortunately, can't seem to be able to push to RubyGems.org for now (it goes 500).

Until I find a workaround, you can point to that new rufus-scheduler with

gem 'rufus-scheduler', :git => 'git://github.com/jmettraux/rufus-scheduler.git', :branch => 'two'

UPDATE

Could push rufus-scheduler 2.0.24 to rubygems https://rubygems.org/gems/rufus-scheduler

It should be OK now.