How to add gem dependencies that host on other site in a gemspec file?
In a gemspec file, is there a way to add dependency gem that hosts on other sites like github? I build a gem that has a dependency to http://github.com/mbleigh/mash. I checked the method add_dependency, but it seems it doesn't have t开发者_运维问答hat functionality. Could anyone show me how to do this?
No, AFAIK you can't. It's responsibility of the end-user to add additional sources to its gem configuration in order to download third-party Gems.
Some applications, such as Bundler and Rails, also allows the developer to define which is the Gem source for a specific Gem.
I agree it would be a nice option in the .gemspec
file itself.
精彩评论