{"action":"created","issue":{"url":"https://api.github.com/repos/bundler/bundler/issues/3982","labels_url":"https://api.github.com/repos/bundler/bundler/issues/3982/labels{/name}","comments_url":"https://api.github.com/repos/bundler/bundler/issues/3982/comments","events_url":"https://api.github.com/repos/bundler/bundler/issues/3982/events","html_url":"https://github.com/bundler/bundler/issues/3982","id":105349567,"number":3982,"title":"with_clean_env does not replace original RUBYLIB environmental variable","user":{"login":"robertclancy","id":1092611,"avatar_url":"https://avatars.githubusercontent.com/u/1092611?v=3","gravatar_id":"","url":"https://api.github.com/users/robertclancy","html_url":"https://github.com/robertclancy","followers_url":"https://api.github.com/users/robertclancy/followers","following_url":"https://api.github.com/users/robertclancy/following{/other_user}","gists_url":"https://api.github.com/users/robertclancy/gists{/gist_id}","starred_url":"https://api.github.com/users/robertclancy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertclancy/subscriptions","organizations_url":"https://api.github.com/users/robertclancy/orgs","repos_url":"https://api.github.com/users/robertclancy/repos","events_url":"https://api.github.com/users/robertclancy/events{/privacy}","received_events_url":"https://api.github.com/users/robertclancy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-08T10:31:32Z","updated_at":"2015-09-08T20:42:27Z","closed_at":null,"body":"[with_clean_env](https://github.com/bundler/bundler/blob/9cb77343377856af5920691d99ba9075a8bccec2/lib/bundler.rb#L274-L284) does not reset the RUBYLIB environmental variable. This results in any calls to bundler in that environment will use the current bundler version. For example, I would expect\r\n```\r\nbundle _1.10.0_ exec ruby -e \"require 'bundler'; Bundler.clean_system('bundle _1.9.1_ exec ruby -e \\\"require \\\\'bundler\\\\'; puts Bundler::VERSION\\\"')\"\r\n```\r\nto return 1.9.1, but it returns 1.10.0."},"comment":{"url":"https://api.github.com/repos/bundler/bundler/issues/comments/138693479","html_url":"https://github.com/bundler/bundler/issues/3982#issuecomment-138693479","issue_url":"https://api.github.com/repos/bundler/bundler/issues/3982","id":138693479,"user":{"login":"indirect","id":78,"avatar_url":"https://avatars.githubusercontent.com/u/78?v=3","gravatar_id":"","url":"https://api.github.com/users/indirect","html_url":"https://github.com/indirect","followers_url":"https://api.github.com/users/indirect/followers","following_url":"https://api.github.com/users/indirect/following{/other_user}","gists_url":"https://api.github.com/users/indirect/gists{/gist_id}","starred_url":"https://api.github.com/users/indirect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indirect/subscriptions","organizations_url":"https://api.github.com/users/indirect/orgs","repos_url":"https://api.github.com/users/indirect/repos","events_url":"https://api.github.com/users/indirect/events{/privacy}","received_events_url":"https://api.github.com/users/indirect/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T20:42:27Z","updated_at":"2015-09-08T20:42:27Z","body":"The Bundler gem is not loaded from `RUBYLIB`... perhaps you can give an example that does use `RUBYLIB` for something?"}}