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

 

Fix

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!

2 thoughts on “rbenv does not work in aptana terminal for Mac OS X

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s