Conditional gem dependencies

前端 未结 2 1658
傲寒
傲寒 2021-01-05 03:31

Is it possible to conditionally set a dependency on a gem at install time? Here\'s my situation which will hopefully clarify the question.

There is a gem I maintain

2条回答
  •  时光取名叫无心
    2021-01-05 04:04

    checkout a somewhat tutorial here: https://github.com/rdp/ruby_tutorials_core/wiki/gem (https://en.wikibooks.org/wiki/Ruby_Programming/RubyGems)

    it shows how to install different versions of dependencies depending on what version of ruby the installee is using.

    (short answer--it ain't as easy as it should be)

提交回复
热议问题