Bundler since v1.7 issues a warning when more than one global source is specified in the gemfile
. You can use source blocks to specify which gems should come from a given source, but the source option for individual gems does not work in the gemspec
.
How can one specify the source for a dependency in the gemspec? E.g.
Gem::Specification.new do |s|
# Gemspec contents omitted for brevity
# Lets say this one comes from RubyGems.org
s.add_runtime_dependency 'aruntimedep', '~> 1.0'
# And this one needs to be sourced from a private gem server
s.add_development_dependency 'adevdep', '~> 3.0'
# Note, Bundler throws an error in this case
# s.add_development_dependency 'adevdep', '~> 3.0', :source => "mygemserver.org"
end