0

I want to install ruby 2.1.2 with rbenv on my computer.

I've installed Homebrew to accomplish this.

After doing brew install rbenv

I get the following messages, of which I don't understand much:

To use Homebrew's directories rather than ~/.rbenv add to your profile:
  export RBENV_ROOT=/usr/local/var/rbenv

To enable shims and autocompletion add to your profile:
  if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
==> Summary
  /usr/local/Cellar/rbenv/0.4.0: 31 files, 152K, built in 3 seconds

What does the above mean and what should I do..?

Fellow Stranger
  • 32,129
  • 35
  • 168
  • 232

2 Answers2

1

Your profile is a file called .profile inside your home directory, e.g. /Users/youruser/.profile. Create that file in a text editor, and paste those two lines into it. The commands in that file will be executed when you open a new terminal window.

JW.
  • 50,691
  • 36
  • 115
  • 143
1

I think it means that if you want to use a global directory for settings etc. instead of a local user-specific directory (i.e. YOUR_HOME/.rbenv), you can add the first line to your profile file. Moreover, if you want to enable autocompletion for commands etc, you can do the same with the second line.

I'm not sure, but I think that if you use Bash (the mac os x default), your profile file is in your home directory, named .bash_profile

ivanhoe1024
  • 79
  • 1
  • 6