fix rbenv module UnboundLocalError
Backport #14428 to 2014.7
Merge branch '2014.7' into develop