Conditional gem dependencies

不想你离开。 提交于 2019-11-30 19:19:28

Hmm,

I believe one can code multiple dependencies because I've noticed gems which seemed to do this. But I would you advise against doing this. No matter how simple the code you are inserting here is, when you consider that the user will be loading one gem which depends on another which depends on another, even a small glitch in the logic of one piece of code or another can make the whole dependency train a nightmare.

So, I'd leave your kludge as-is. Further, I'd suggest you have a tarball that users can download as well. I've had to manually extract the code inside of gems whose configuration code wouldn't let me install them.

rogerdpack

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)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!