bundler-site icon indicating copy to clipboard operation
bundler-site copied to clipboard

Documentation issue about `gemspec name:`

Open sardaukar opened this issue 5 years ago • 2 comments

The docs say

If you have multiple gemspecs in the same directory, specify which one you'd like to reference using :name

gemspec :name => 'my_awesome_gem'

This will use my_awesome_gem.gemspec

but I've found that if I have 2 differently named gemspec files (gemname-rails3.gemspec and gemname-rails4.gemspec) and they both have specification.name = "gemname", if I use gemspec name: "gemname-rails4" on my Gemfile, it'll tell me not found. So it seems like the file name is ignored and what's used instead is the name setting on the gemspec.

sardaukar avatar May 17 '19 11:05 sardaukar

Which, by the way, is a bummer :D

sardaukar avatar May 17 '19 11:05 sardaukar

Dumb question: Would it work to use gemspec :path => 'gemname-rails4'?

https://github.com/rubygems/rubygems/blob/c8890052879c23abe814b6dbb4cd8c8751f6c045/bundler/lib/bundler/source/path.rb#L25

olleolleolle avatar Apr 09 '20 17:04 olleolleolle