carlhuda/bundler — Issue #1679: Support native extensions for gems specified as paths
Author: dlee
Created: 2012-02-26 10:42:58+00:00
State: open

Using local gem directories using :path is very useful for gem development. This is no exception for gems that provide native extensions. However, bundler in its current form doesn't allow compiling C extensions for gems specified as paths, according to the Gemfile manpage:

Unlike :git, bundler does not compile C extensions for gems specified as paths.

This is presumably because we don't want bundler creating files within the local gem's directory. It would be nice if there was a way to tell bundler to force compilation of C extensions in these cases:

```
gem "mygem", :path => "../mygem", :compile => true
```

If you think this is too dangerous, then it might be useful to have a :build option, so that doing `bundle install` would automatically `gem build` and then install those gems. Likewise, `bundle update` would delete all :build gems and re-build and re-install them.

```
gem 'mygem', :build => "../mygem"
# or
gem 'mygem', :path => "../path", :build => true
```