{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"open","user":{"avatar_url":"https://secure.gravatar.com/avatar/18736b2cc5b8efd36906697159481cab?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"18736b2cc5b8efd36906697159481cab","url":"https://api.github.com/users/blueboxjesse","login":"blueboxjesse","id":606},"milestone":{"state":"open","open_issues":2,"url":"https://api.github.com/repos/wayneeseguin/rvm/milestones/5","due_on":"2011-10-30T07:00:00Z","number":5,"description":"","creator":{"avatar_url":"https://secure.gravatar.com/avatar/3ec52ed58eb92026d86e62c39bdb7589?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"3ec52ed58eb92026d86e62c39bdb7589","url":"https://api.github.com/users/mpapis","login":"mpapis","id":48054},"title":"rvm 1.9.1","closed_issues":7,"created_at":"2011-10-22T18:58:42Z"},"labels":[],"assignee":null,"updated_at":"2011-10-29T06:45:41Z","comments":3,"closed_at":null,"url":"https://api.github.com/repos/wayneeseguin/rvm/issues/538","body":"The latest version of RVM seems to break the PATH variable in a multi user install.\r\n\r\nHere's the PATH from version 1.9.0:\r\n/usr/local/rvm/gems/ruby-1.9.2-p290/bin:/usr/local/rvm/gems/ruby-1.9.2-p290@global/bin:/usr/local/rvm/rubies/ruby-1.9.2-p290/bin:/usr/local/rvm/bin:/bin:/sbin:/usr/bin:/usr/sbin:\r\n\r\nHere's the PATH generated when we su - deploy on the latest:\r\n:/usr/local/rvm/gems/ruby-1.9.2-p290/bin/usr/local/rvm/gems/ruby-1.9.2-p290@global/bin/usr/local/rvm/rubies/ruby-1.9.2-p290/bin/usr/local/rvm/bin/usr/local/bin/usr/bin/bin/usr/local/games/usr/games\r\n\r\nUbuntu 10.04 base install, all built with Chef.\r\n\r\nPlease let me know what else I can provide.","html_url":"https://github.com/wayneeseguin/rvm/issues/538","number":538,"title":"Head breaks PATH variable on multi-user install","id":2084830,"created_at":"2011-10-28T23:20:19Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/18736b2cc5b8efd36906697159481cab?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"18736b2cc5b8efd36906697159481cab","url":"https://api.github.com/users/blueboxjesse","login":"blueboxjesse","id":606},"updated_at":"2011-10-29T06:45:41Z","url":"https://api.github.com/repos/wayneeseguin/rvm/issues/comments/2563750","body":"I looked into this more tonight trying to track down the offending commit.\r\n\r\nHere's what the issue looks like:\r\n\r\n```bash\r\n$ sudo su -\r\n-su: groups: command not found\r\n-su: lesspipe: command not found\r\n-su: dircolors: command not found\r\n-su: mesg: command not found\r\nroot@block274005-ia7:/etc/profile.d# ls -la\r\n-su: ls: command not found\r\nroot@block274005-ia7:/etc/profile.d# rvm\r\n-su: awk: command not found\r\n-su: cat: No such file or directory\r\n\r\nA RVM version  is installed yet 1.9.0 is loaded.\r\n Please do one of the following:\r\n  * 'rvm reload'\r\n  * open a new shell\r\n\r\nroot@block274005-ia7:/etc/profile.d# rvm reload\r\n-su: awk: No such file or directory\r\n-su: cat: No such file or directory\r\n-su: grep: No such file or directory\r\n-su: cat: No such file or directory\r\nRVM reloaded!\r\n-su: dirname: No such file or directory\r\n-su: dirname: No such file or directory\r\nroot@block274005-ia7:/etc/profile.d# echo $PATH\r\n```\r\n\r\nVersus this is what happens normally:\r\n\r\n```bash\r\ndeploy@block274005-ia7:/etc/profile.d$ echo $PATH\r\n/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games\r\n```\r\n\r\nI tracked the issue down to lines 47 - 52 of /etc/profile.d/rvm.sh (scripts/functions/installer lines 906-912).  More specifically, __rvm_add_to_path prepend is being called with the \"${rvm_bin_path}\" part being blank.\r\n\r\nSince I know that code works in 1.9.0, I looked at the blame here and can see nothing was changed recently:\r\nhttps://github.com/wayneeseguin/rvm/blame/master/scripts/functions/installer\r\n\r\nThat indicated to me that something was amiss in __rvm_add_to_path( or the way it's being called.\r\n\r\nThis is because rvm_bin_path is never set.\r\n\r\nFrom what I can tell, rvm_bin_path is set in scripts/initialize, and is being torn down in scripts/functions/environment.  That tear down gets called during the init proces, leaving rvm_bin_path blank and causing havoc.\r\n\r\nI'm submitting a pull request now that fixed this locally for me.\r\n","id":2563750,"created_at":"2011-10-29T06:45:41Z"}}