carlhuda/bundler — Issue #1502: Git sourced gems are not built then installed as advertised
Author: mrzor
Created: 2011-10-26 15:32:24+00:00
State: open

#### Issue
I'm running into an issue with git sourced gems. Basically, if the gem specifies any binary, they won't work through rubygems, despite a wrapper being installed in gems/bin directory.

This probably has something to do with the following :

```
source "http://rubygems.org"
gem "my_tool_in_a_gem", :git => "git@github.com:whatever/tool.git"
```
`bundle exec my_tool` works properly and makes up for a workaround.

`gem list -l | grep my_tool` gives nothing. As far as rubygems is concerned, the gem is not there, despite the generic (rubygems generated) wrapper being available in gems/bin directory.

#### Not as advertised

Gemfile.5 manpage:

> To install a gem located in a git repository, bundler changes to the directory containing the gemspec, runs gem build name.gemspec and then installs the resulting gem. The gem build command, which comes standard with Rubygems, evaluates the .gemspec in the context of the directory in which it is located.

#### Probable cause

I'm fairly confident the gemspec is valid, i.e. `gem build my_tool.spec; gem install my_took.gem` works properly.

I'm running bundler 1.0.21, and [this comment in source.rb] (https://github.com/carlhuda/bundler/blob/v1.0.21/lib/bundler/source.rb#L416-420) appears to state what I'm having is intended behavior. Master branch as of today seems identical.

Please reconsider the committed position on this issue : imo, building the whole gem and installing it is worth the extra mile.