質問

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?

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top