Closed jamesarosen closed 12 years ago
After clearing out my cached gems and rebundling, it looks like the problem was that I had the development version of the sprockets-commonjs.gemspec
in vendor/bundles/.../specifications
instead of the compiled one. I don't know how that happened.
When Bundler generates bin stubs, it iterates over each gem, evaluating its gemspec (without changing the working directory). In the case of sprockets-commonjs, that means
git ls-files -- bin/*
is run in the current project. If there are any other gems that have binaries, that call will find them all, causing Bundler to think that sprockets-commonjs has a copy of each binary from each other gem.Additionally, if you happen to be using sprockets-commonjs with Bundler and bin stubs on a machine that doesn't have
git
, that call will fail.The solution is to use
Dir.glob
or similar instead ofgit ls-files
. I will work on this.