rbenv does not work in aptana terminal for Mac OS X

rbenv is the best solution to to pick a ruby version for your specific environment.
However, even if rbenv has been installed successfully, the “Terminal” in Aptana Studio cannot stop choose the system default ruby version.

Because aptana terminal does not load ~/.bash_profile



My Environments

  • Mac OS X Mountain Lion
  • Aptana Studio 3
  • rbenv 0.4.0

Aptana terminal load the .aptanarc instead of .bashrc when start up. You can insert a path configurations for rbenv on it like this

$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.aptanarc
$ echo 'eval "$(rbenv init -)"' >> ~/.aptanarc

Enjoy, rubymongers!