{"action":"created","issue":{"url":"https://api.github.com/repos/bpinto/oh-my-fish/issues/337","labels_url":"https://api.github.com/repos/bpinto/oh-my-fish/issues/337/labels{/name}","comments_url":"https://api.github.com/repos/bpinto/oh-my-fish/issues/337/comments","events_url":"https://api.github.com/repos/bpinto/oh-my-fish/issues/337/events","html_url":"https://github.com/bpinto/oh-my-fish/pull/337","id":54932683,"number":337,"title":"Fix some issues with the usage of RBENV_ROOT.","user":{"login":"daenney","id":569574,"avatar_url":"https://avatars.githubusercontent.com/u/569574?v=3","gravatar_id":"","url":"https://api.github.com/users/daenney","html_url":"https://github.com/daenney","followers_url":"https://api.github.com/users/daenney/followers","following_url":"https://api.github.com/users/daenney/following{/other_user}","gists_url":"https://api.github.com/users/daenney/gists{/gist_id}","starred_url":"https://api.github.com/users/daenney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daenney/subscriptions","organizations_url":"https://api.github.com/users/daenney/orgs","repos_url":"https://api.github.com/users/daenney/repos","events_url":"https://api.github.com/users/daenney/events{/privacy}","received_events_url":"https://api.github.com/users/daenney/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-20T20:09:30Z","updated_at":"2015-01-20T20:14:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bpinto/oh-my-fish/pulls/337","html_url":"https://github.com/bpinto/oh-my-fish/pull/337","diff_url":"https://github.com/bpinto/oh-my-fish/pull/337.diff","patch_url":"https://github.com/bpinto/oh-my-fish/pull/337.patch"},"body":"`RBENV_ROOT` can be used to relocate where rbenv ends up storing the shims\r\nand versions of Ruby it installs. Because of this split `RBENV_ROOT`\r\ncannot be used to reliably construct a path to the rbenv binary itself.\r\n\r\nWe now try to find rbenv on `$PATH` first. If it cannot be found we check\r\nif it's been installed in the user's home directory. If neither\r\ncondition is met we inform the user of this and stop. We additionally\r\nrecord if it was found on $PATH or not as depending on that we need to\r\nprepend `$HOME/.rbenv/bin` to our `$PATH`.\r\n\r\nOnce rbenv is found we ask it to inform us of what it considers to be\r\nit's root directory. This will either be the value of the `$RBENV_ROOT`\r\nenvironment variable or the location within the user's home directory\r\nwhich we also end up prepending to `$PATH`."},"comment":{"url":"https://api.github.com/repos/bpinto/oh-my-fish/issues/comments/70724382","html_url":"https://github.com/bpinto/oh-my-fish/pull/337#issuecomment-70724382","issue_url":"https://api.github.com/repos/bpinto/oh-my-fish/issues/337","id":70724382,"user":{"login":"daenney","id":569574,"avatar_url":"https://avatars.githubusercontent.com/u/569574?v=3","gravatar_id":"","url":"https://api.github.com/users/daenney","html_url":"https://github.com/daenney","followers_url":"https://api.github.com/users/daenney/followers","following_url":"https://api.github.com/users/daenney/following{/other_user}","gists_url":"https://api.github.com/users/daenney/gists{/gist_id}","starred_url":"https://api.github.com/users/daenney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daenney/subscriptions","organizations_url":"https://api.github.com/users/daenney/orgs","repos_url":"https://api.github.com/users/daenney/repos","events_url":"https://api.github.com/users/daenney/events{/privacy}","received_events_url":"https://api.github.com/users/daenney/received_events","type":"User","site_admin":false},"created_at":"2015-01-20T20:14:30Z","updated_at":"2015-01-20T20:14:30Z","body":"I think there's a couple of mistakes in there. Need to look at it a bit more but this is the general idea."}}