Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ruby: aliased to bundled_ruby

Tags:

ruby

rbenv

When I type in which ruby it always returns ruby: aliased to bundled_ruby

When I try which bundled_ruby it returns:

bundled_ruby () {
    _run-with-bundler ruby $@
}

Then I try which _run-with-bundler and it returns:

_run-with-bundler () {
    if _bundler-installed && _within-bundled-project
    then
        bundle exec $@
    else
        $@
    fi
}

Where did all this come from and how do I get my which ruby to work again?

I am using OSX (v10.8.2), brew, rbenv, ruby-build, zsh

like image 631
Coderama Avatar asked Aug 22 '13 04:08

Coderama


1 Answers

This is part of rbenv "magic" to handle several ruby versions with several gem versions. Have a look at ~/.rbenv/shims/ruby, IIRC the script is defined there.

If you want to disable this, just unalias ruby: this deletes the generated alias.

like image 64
ckruse Avatar answered Nov 15 '22 23:11

ckruse