b4mboo/git-review — Issue #22: Dependency versions not specified in .gemspec
Author: dmajda
Created: 2012-01-19 14:17:06+00:00
State: open

I recently upgraded get-review on my machine to version 0.8.6. An attempt to use it ended up with an error:

dmajda@dreadnought:~/dev/studio/ui-server> git review create
/usr/lib64/ruby/gems/1.8/gems/octokit-0.5.1/lib/octokit.rb:16:in `method_missing': undefined method `api_version=' for Octokit:Module (NoMethodError)
from /usr/lib64/ruby/gems/1.8/gems/git-review-0.8.6/bin/../lib/git-review.rb:341:in `configure_github_access'
from /usr/lib64/ruby/gems/1.8/gems/octokit-0.5.1/lib/octokit/configuration.rb:41:in `configure'
from /usr/lib64/ruby/gems/1.8/gems/git-review-0.8.6/bin/../lib/git-review.rb:340:in `configure_github_access'
from /usr/lib64/ruby/gems/1.8/gems/git-review-0.8.6/bin/../lib/git-review.rb:189:in `initialize'
from /usr/lib64/ruby/gems/1.8/gems/git-review-0.8.6/bin/git-review:8:in `new'
from /usr/lib64/ruby/gems/1.8/gems/git-review-0.8.6/bin/git-review:8
from /usr/bin/git-review:19:in `load'
from /usr/bin/git-review:19

After upgrading Octokit to version 0.6.5, the problem was solved. The git-review code apparently used a functionality available only in a newer version than the one I had installed.

I looked at `git-review.gemspec` and noted that required dependency versions are not specified there at all. They should be specified explicitly using `>=` or `~=` so that issues like I encountered do not happen and upgrades of dependencies are forced when needed.