Sana
Sana

Reputation: 79

`-bash: rbenv: command not found` comes up every time I open a terminal window. How do I fix this?

I tried installing rails using rbenv, but was unsuccessful. I then uninstalled rbenv and installed rails with rvm. Now every time I open my terminal window I get the follow

 Last login: Wed Jul 17 21:59:43 on ttys001
 -bash: rbenv: command not found
 -bash: rbenv: command not found
 name-Mac-mini:~ name$

When I use homebrew to uninstall I get

$ brew uninstall rbenv
Error: No such keg: /usr/local/Cellar/rbenv

I have mac-mini running Mountain Lion 10.8.4. Any ideas on how I can get fix this?

Upvotes: 1

Views: 5384

Answers (2)

thetallweeks
thetallweeks

Reputation: 7405

I had the exact same problem and here was my fix. Like zchrykng said, it was a line in my .bash_profile.

Run $ sudo pico .bash_profile to open up the file for edit. (You will have to enter your password)

I had to remove eval "$(rbenv init -)" which was at the bottom of the document repeated twice. After removing these lines, save and you shouldn't see the error anymore.

Upvotes: 5

zchrykng
zchrykng

Reputation: 1096

Without being able to see your .bashrc or .bash_profile files, I would guess that you have a line in one of them what is supposed to be loading something from rbenv.

I would check there to see if there is something that might be loading is.

Upvotes: 2

Related Questions