{"action":"created","issue":{"url":"https://api.github.com/repos/rubygems/rubygems/issues/1400","labels_url":"https://api.github.com/repos/rubygems/rubygems/issues/1400/labels{/name}","comments_url":"https://api.github.com/repos/rubygems/rubygems/issues/1400/comments","events_url":"https://api.github.com/repos/rubygems/rubygems/issues/1400/events","html_url":"https://github.com/rubygems/rubygems/issues/1400","id":119474051,"number":1400,"title":"Problems bundling gems that require gems in the stdlib","user":{"login":"krig","id":25527,"avatar_url":"https://avatars.githubusercontent.com/u/25527?v=3","gravatar_id":"","url":"https://api.github.com/users/krig","html_url":"https://github.com/krig","followers_url":"https://api.github.com/users/krig/followers","following_url":"https://api.github.com/users/krig/following{/other_user}","gists_url":"https://api.github.com/users/krig/gists{/gist_id}","starred_url":"https://api.github.com/users/krig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krig/subscriptions","organizations_url":"https://api.github.com/users/krig/orgs","repos_url":"https://api.github.com/users/krig/repos","events_url":"https://api.github.com/users/krig/events{/privacy}","received_events_url":"https://api.github.com/users/krig/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-30T11:30:19Z","updated_at":"2015-11-30T11:55:15Z","closed_at":null,"body":"I am running `bundle package` to bundle all of the gems that my [Rails app][1] are using in order to package the app as a dependency-less `.rpm` for distribution. I've previously had the issue that if a gem that has been included in the stdlib is included in the `Gemfile`, bundler would crash with a nil dereference. To work around this, I strip the offending gems from the Gemfile before bundling (rdoc, rake and json).\r\n\r\nHowever, recently one of the gems I depend on added [this line][2] where it calls `gem \"json\"` directly. With this line, gem doesn't find the json gem required in a Gemfile and fails, even though the json gem is available as part of the standard library.\r\n\r\nIt seems to me that `gem \"json\"` should always succeed since json is available, just not as a freestanding gem. The error I'm getting is [here][3]. I don't see why it's failing there since `json` is available.\r\n\r\n[1]: https://github.com/ClusterLabs/hawk\r\n[2]: https://github.com/webhippie/po_to_json/blob/master/lib/po_to_json.rb#L26\r\n[3]: https://gist.github.com/krig/aa0bddad17b33099037f\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/rubygems/rubygems/issues/comments/160609479","html_url":"https://github.com/rubygems/rubygems/issues/1400#issuecomment-160609479","issue_url":"https://api.github.com/repos/rubygems/rubygems/issues/1400","id":160609479,"user":{"login":"krig","id":25527,"avatar_url":"https://avatars.githubusercontent.com/u/25527?v=3","gravatar_id":"","url":"https://api.github.com/users/krig","html_url":"https://github.com/krig","followers_url":"https://api.github.com/users/krig/followers","following_url":"https://api.github.com/users/krig/following{/other_user}","gists_url":"https://api.github.com/users/krig/gists{/gist_id}","starred_url":"https://api.github.com/users/krig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krig/subscriptions","organizations_url":"https://api.github.com/users/krig/orgs","repos_url":"https://api.github.com/users/krig/repos","events_url":"https://api.github.com/users/krig/events{/privacy}","received_events_url":"https://api.github.com/users/krig/received_events","type":"User","site_admin":false},"created_at":"2015-11-30T11:55:15Z","updated_at":"2015-11-30T11:55:15Z","body":"@segiddins I wasn't sure exactly where the problem was. Yes, I've tried running with the patch for bundler (this one, right? https://github.com/bundler/bundler/commit/5f2d983fc909290599d04f4cd414334552add172). Unfortunately, that avoids the crash on null access in bundler, but bundler still fails since it can't bundle the gem, and `bundle package` ends up doing nothing. So the end result is just as bad for me.\r\n\r\nBut I'll open a bundler issue instead.\r\n"}}