{"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":8,"created_at":"2015-12-23T03:28:43Z","updated_at":"2016-03-18T06:07:47Z","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/198221316","html_url":"https://github.com/bundler/bundler/issues/4182#issuecomment-198221316","issue_url":"https://api.github.com/repos/bundler/bundler/issues/4182","id":198221316,"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":"2016-03-18T06:07:47Z","updated_at":"2016-03-18T06:07:47Z","body":"@FooBarWidget we're aware of the bug and the confused users, and that's why we have fixed the bug and released a version of Bundler with the fix that anyone can use.\r\n\r\nI'm not sure where you were looking for release candidates, but we have only released one, and it was three days ago. Here's the list from rubygems.org/gems/bundler:\r\n\r\n * 1.12.0.rc - March 14, 2016 (275 KB)\r\n * 1.12.0.pre.2 - February 26, 2016 (269 KB)\r\n * 1.12.0.pre.1 - February 9, 2016 (267 KB)\r\n\r\nWe've been trying to get 1.12 out as fast as we can. When you started with \"We're getting a lot of support requests in the Passenger support channels about exactly this problem.\" and concluded with \"Could you release the fix sooner? Right now lots of users are confused.\", it makes it sound like you want us to stop whatever paid work we're doing and instead do unpaid open source work to speed up the release in order to make your (paid!) job easier. Asking for our uncompensated labor in order to make your compensated labor easier—that's the part that sounds demanding and entitled."}}