{"action":"created","issue":{"url":"https://api.github.com/repos/burke/zeus/issues/530","labels_url":"https://api.github.com/repos/burke/zeus/issues/530/labels{/name}","comments_url":"https://api.github.com/repos/burke/zeus/issues/530/comments","events_url":"https://api.github.com/repos/burke/zeus/issues/530/events","html_url":"https://github.com/burke/zeus/pull/530","id":109711135,"number":530,"title":"Use bundler/setup instead of custom loading code","user":{"login":"kgrz","id":400299,"avatar_url":"https://avatars.githubusercontent.com/u/400299?v=3","gravatar_id":"","url":"https://api.github.com/users/kgrz","html_url":"https://github.com/kgrz","followers_url":"https://api.github.com/users/kgrz/followers","following_url":"https://api.github.com/users/kgrz/following{/other_user}","gists_url":"https://api.github.com/users/kgrz/gists{/gist_id}","starred_url":"https://api.github.com/users/kgrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kgrz/subscriptions","organizations_url":"https://api.github.com/users/kgrz/orgs","repos_url":"https://api.github.com/users/kgrz/repos","events_url":"https://api.github.com/users/kgrz/events{/privacy}","received_events_url":"https://api.github.com/users/kgrz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-04T23:05:20Z","updated_at":"2015-11-30T04:17:06Z","closed_at":"2015-11-30T04:16:49Z","pull_request":{"url":"https://api.github.com/repos/burke/zeus/pulls/530","html_url":"https://github.com/burke/zeus/pull/530","diff_url":"https://github.com/burke/zeus/pull/530.diff","patch_url":"https://github.com/burke/zeus/pull/530.patch"},"body":"I'm not sure if this has been discussed already. Using the `require\n'bundle/setup'` directive made the gem activation errors a bit more\npredictable for me during some preliminary runs. It's quite possible\nthat I might've missed something here.\n\nAdding \"require 'bundler/setup'\" to a file will add the bundled gems to\nthe load path. This is a much safer way to load gems instead of using\n`gem <gemname>, <version>` where version is parsed from the Gemfile.\n\nLoading 'bundler/setup.rb' does the following things:\n\n1. Cleans load path; one of it's function is to removing system gems\n   from the load path.\n2. Loads the gem specs from Gemfile.lock\n3. Sets up the following path variables:\n   BUNDLE_BIN_PATH\n   BUNDLE_GEMFILE: location of the Gemfile\n   PATH: Appends the location of `bundle` executable for the current\n         Ruby version to the PATH.\n   RUBYOPT\n   RUBYLIB\n3. Activate the loaded Gem file specs. This is where the command would\n   throw an exception if there's a conflict in the case where a\n   different version of a particular gem in the Gemfile.lock has already\n   been loaded.\n\nThis makes the process more transparent. After this change, the error\nnotifications would be split into two cases: 1. Before the connection\nbetween Go daemon and the Ruby process gets established and 2. After the\nconnection gets setup.\n\nIn the case of 1, the error messages still won't show up in the UI and\n`dtruss` or `strace` is the only way to figure out the error. However,\nin the case of 2, any error in the loading would cause the zeus Go\nprocess to throw an error (prompts turning red) and running any of the\ncommands would result in a backtrace."},"comment":{"url":"https://api.github.com/repos/burke/zeus/issues/comments/160512362","html_url":"https://github.com/burke/zeus/pull/530#issuecomment-160512362","issue_url":"https://api.github.com/repos/burke/zeus/issues/530","id":160512362,"user":{"login":"latortuga","id":9379,"avatar_url":"https://avatars.githubusercontent.com/u/9379?v=3","gravatar_id":"","url":"https://api.github.com/users/latortuga","html_url":"https://github.com/latortuga","followers_url":"https://api.github.com/users/latortuga/followers","following_url":"https://api.github.com/users/latortuga/following{/other_user}","gists_url":"https://api.github.com/users/latortuga/gists{/gist_id}","starred_url":"https://api.github.com/users/latortuga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/latortuga/subscriptions","organizations_url":"https://api.github.com/users/latortuga/orgs","repos_url":"https://api.github.com/users/latortuga/repos","events_url":"https://api.github.com/users/latortuga/events{/privacy}","received_events_url":"https://api.github.com/users/latortuga/received_events","type":"User","site_admin":false},"created_at":"2015-11-30T04:17:06Z","updated_at":"2015-11-30T04:17:06Z","body":"I'm happy enough with issues surrounding json and rake being mitigated by this to merge it."}}