Hm, this only works if you have a constraint in your `Gemfile` like so:
`gem 'json', '= 1.8.0'`

However I think it should use whatever version of json is locked regardless of whether it's explicitly included in your `Gemfile`
```ruby
if File.exist?(gemfile) && version = File.read('Gemfile.lock')[/^    json \((.*)\)/, 1]
```

The change is that the regex looks for the entry from the following part of `Gemfile.lock` rather than the `DEPENDENCIES` part:
```
GEM:
  specs:
```