mongodb/mongo-ruby-driver — comment on commit 9e2f562892cf339275d2e7f835268c64723daf33
File:  line 0
By fullbridge-batkins:

This commit breaks the gemspec file so that it is in an invalid format for older versions of Rubygems. I believe to fix it, this line needs to be changed to:

s.add_dependency('bson', [Mongo::VERSION])

or something to that effect. Just updated my project to use `mongo`, `bson`, & `bson_ext` versions `1.6.0` and then tried to push to Heroku and got the following error when running `heroku run gem list`:

WARNING: # 1.6.0"]>
# -*- encoding: utf-8 -*-

Gem::Specification.new do |s|
s.name = %q{mongo}
s.version = "1.6.0"
...
if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3

if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q, ["# 1.6.0"])
else
s.add_dependency(%q, ["# 1.6.0"])
end
else
s.add_dependency(%q, ["# 1.6.0"])
end
end
WARNING: Invalid .gemspec format in '/app/.bundle/gems/ruby/1.9.1/specifications/mongo-1.6.0.gemspec'

Heroku is running `Rubygems 1.3.7`. I'm not 100% certain that my suggestion fixes it, I just know that right now it is invalid for older versions of `Rubygems`, and should be yanked. [Here is a blog post](http://blog.rubygems.org/2011/08/31/shaving-the-yaml-yak.html) written by Tenderlove where he discusses the source of the error and the fix.

Try looking at `indirect`'s comments on this [issue request on the bundler gem](https://github.com/carlhuda/bundler/issues/1392). He seems to have some good suggestions of what to look for in bundler as well as how to fix it.