{"action":"created","issue":{"url":"https://api.github.com/repos/bundler/bundler/issues/4182","repository_url":"https://api.github.com/repos/bundler/bundler","labels_url":"https://api.github.com/repos/bundler/bundler/issues/4182/labels{/name}","comments_url":"https://api.github.com/repos/bundler/bundler/issues/4182/comments","events_url":"https://api.github.com/repos/bundler/bundler/issues/4182/events","html_url":"https://github.com/bundler/bundler/issues/4182","id":123596781,"number":4182,"title":"Errors during automatic require are swallowed","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},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-12-23T03:28:43Z","updated_at":"2016-03-18T06:37:06Z","closed_at":"2015-12-28T02:26:00Z","body":"When `Bundler.require` is called by e.g. Rails, Bundler will try to require every gem listed in the Gemfile. If there is an error while requiring said gem, Bundler will completely suppress the error, and instead print its own error with the message \"there was an error requiring 'some_gem'\". At an absolute minimum, we should print the underlying exception message, and we should probably also mention that you can use verbose/debug mode to see the backtrace.\r\n\r\nFor example, the code `require 'coffee-rails'` will check for a JavaScript interpreter, and raise an error if none is found. That error looks like this:\r\n\r\n```\r\nirb(main):001:0> require 'coffee-rails'\r\nExecJS::RuntimeUnavailable: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.\r\n```\r\n\r\nIf you have a Gemfile with coffee-rails in it, however, calling `Bundler.require` will instead print this singularly useless message:\r\n\r\n```\r\n/usr/local/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'coffee-rails'. (Bundler::GemRequireError)\r\n\tfrom /usr/local/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'\r\n\tfrom /usr/local/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'\r\n\tfrom /usr/local/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'\r\n\tfrom /usr/local/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'\r\n\tfrom /usr/local/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'\r\n\tfrom /usr/local/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'\r\n\tfrom /var/web/releases/20151223030515/config/application.rb:5:in `<top (required)>'\r\n```"},"comment":{"url":"https://api.github.com/repos/bundler/bundler/issues/comments/198228844","html_url":"https://github.com/bundler/bundler/issues/4182#issuecomment-198228844","issue_url":"https://api.github.com/repos/bundler/bundler/issues/4182","id":198228844,"user":{"login":"FooBarWidget","id":819,"avatar_url":"https://avatars.githubusercontent.com/u/819?v=3","gravatar_id":"","url":"https://api.github.com/users/FooBarWidget","html_url":"https://github.com/FooBarWidget","followers_url":"https://api.github.com/users/FooBarWidget/followers","following_url":"https://api.github.com/users/FooBarWidget/following{/other_user}","gists_url":"https://api.github.com/users/FooBarWidget/gists{/gist_id}","starred_url":"https://api.github.com/users/FooBarWidget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FooBarWidget/subscriptions","organizations_url":"https://api.github.com/users/FooBarWidget/orgs","repos_url":"https://api.github.com/users/FooBarWidget/repos","events_url":"https://api.github.com/users/FooBarWidget/events{/privacy}","received_events_url":"https://api.github.com/users/FooBarWidget/received_events","type":"User","site_admin":false},"created_at":"2016-03-18T06:37:06Z","updated_at":"2016-03-18T06:37:06Z","body":"All right. So do you have an idea of when the final will be? :)"}}