{"action":"created","issue":{"url":"https://api.github.com/repos/bundler/bundler/issues/4270","repository_url":"https://api.github.com/repos/bundler/bundler","labels_url":"https://api.github.com/repos/bundler/bundler/issues/4270/labels{/name}","comments_url":"https://api.github.com/repos/bundler/bundler/issues/4270/comments","events_url":"https://api.github.com/repos/bundler/bundler/issues/4270/events","html_url":"https://github.com/bundler/bundler/issues/4270","id":131172320,"number":4270,"title":"Gemfile.lock curroption detection fails in multi-dependency case","user":{"login":"AlexRiedler","id":1396855,"avatar_url":"https://avatars.githubusercontent.com/u/1396855?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexRiedler","html_url":"https://github.com/AlexRiedler","followers_url":"https://api.github.com/users/AlexRiedler/followers","following_url":"https://api.github.com/users/AlexRiedler/following{/other_user}","gists_url":"https://api.github.com/users/AlexRiedler/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexRiedler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexRiedler/subscriptions","organizations_url":"https://api.github.com/users/AlexRiedler/orgs","repos_url":"https://api.github.com/users/AlexRiedler/repos","events_url":"https://api.github.com/users/AlexRiedler/events{/privacy}","received_events_url":"https://api.github.com/users/AlexRiedler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-03T22:17:48Z","updated_at":"2016-04-07T16:54:34Z","closed_at":null,"body":"## Description\r\n\r\nThis may be more of a feature than a bug; please give forgiveness.\r\n\r\nIf you lose a line in a Gemfile.lock of a dependency, the load order of gems might be incorrect and result in a failure when Bundler.require()\r\n\r\nI provide the following minimal example:\r\n\r\n## Example\r\n\r\nnote before reading, ethon actually depends on `ffi (>= 1.3.0)` but the line has been removed in the Gemfile.lock (which might happen during a bad git merge for instance).\r\n\r\n```\r\nGemfile\r\n\r\n    source 'http://rubygems.org'\r\n\r\n    gem 'typhoeus', '0.6.9'\r\n    gem 'spoon', '0.0.4'\r\n\r\nGemfile.lock\r\n\r\n    GEM\r\n      remote: http://rubygems.org/\r\n      specs:\r\n        ethon (0.8.1)\r\n        ffi (1.9.10)\r\n        spoon (0.0.4)\r\n          ffi\r\n        typhoeus (0.6.9)\r\n          ethon (>= 0.7.1)\r\n\r\n    PLATFORMS\r\n      ruby\r\n\r\n    DEPENDENCIES\r\n      spoon (= 0.0.4)\r\n      typhoeus (= 0.6.9)\r\n\r\n    BUNDLED WITH\r\n       1.11.2\r\n```\r\n\r\n```\r\nbundle exec irb\r\nrequirb(main):001:0> require 'bundler'\r\n=> false\r\nirb(main):002:0> Bundler.require(:default)\r\nLoadError: cannot load such file -- ffi\r\n        from /Users/ariedler/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/ethon-0.8.1/lib/ethon.rb:2:in `require'\r\n        from /Users/ariedler/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/ethon-0.8.1/lib/ethon.rb:2:in `<top (required)>'\r\n        from /Users/ariedler/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/typhoeus-0.6.9/lib/typhoeus.rb:2:in `require'\r\n        from /Users/ariedler/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/typhoeus-0.6.9/lib/typhoeus.rb:2:in `<top (required)>'\r\n        from /Users/ariedler/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `require'\r\n        from /Users/ariedler/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `block (2 levels) in require'\r\n        from /Users/ariedler/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'\r\n        from /Users/ariedler/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'\r\n        from /Users/ariedler/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'\r\n        from /Users/ariedler/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'\r\n        from /Users/ariedler/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'\r\n        from (irb):2\r\n        from /Users/ariedler/.rbenv/versions/2.2.3/bin/irb:11:in `<main>'\r\n```\r\n\r\n## Expected Behaviour\r\n\r\non `bundle install` --> `Your Gemfile.lock is corrupt. ....`"},"comment":{"url":"https://api.github.com/repos/bundler/bundler/issues/comments/206991313","html_url":"https://github.com/bundler/bundler/issues/4270#issuecomment-206991313","issue_url":"https://api.github.com/repos/bundler/bundler/issues/4270","id":206991313,"user":{"login":"CirrusThink","id":555037,"avatar_url":"https://avatars.githubusercontent.com/u/555037?v=3","gravatar_id":"","url":"https://api.github.com/users/CirrusThink","html_url":"https://github.com/CirrusThink","followers_url":"https://api.github.com/users/CirrusThink/followers","following_url":"https://api.github.com/users/CirrusThink/following{/other_user}","gists_url":"https://api.github.com/users/CirrusThink/gists{/gist_id}","starred_url":"https://api.github.com/users/CirrusThink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CirrusThink/subscriptions","organizations_url":"https://api.github.com/users/CirrusThink/orgs","repos_url":"https://api.github.com/users/CirrusThink/repos","events_url":"https://api.github.com/users/CirrusThink/events{/privacy}","received_events_url":"https://api.github.com/users/CirrusThink/received_events","type":"User","site_admin":false},"created_at":"2016-04-07T16:54:34Z","updated_at":"2016-04-07T16:54:34Z","body":"We have been using 1.10.6 for capistrano deployments and took about 2 hours today to figure out that we we had updated a deployment to bundler 1.11.x and could not deploy because of Your Gemfile.lock is corrupt. .... Problem is that we puplessy removed memcached form a dependency because we cant get the gem to install on Solaris 11.  .. is there an option to use bundler 1.11.x and stil manipulate the dependencies ? something like BTW dont use this particular dependency maybe in the gemfile ?"}}