Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Installing a Ruby Development Environment Installing a Ruby Development Environment Installing Ruby on Mac

After rbenv installation, typing rbenv in command line gives error: -bash: rbenv: command not found

I was simply following the video instructions "Installing Ruby on Mac". I have a RoR environment installed from a while ago, but was making sure everything was up-to-date.

2 Answers

Konrad Sierzputowski
Konrad Sierzputowski
3,505 Points

I believe you have to export proper PATH in .bash file at your home directory.

Xander Miller
Xander Miller
9,072 Points

Konrad is right sounds like a $PATH variable issue. Basically $PATH holds a list of directories, when you issue a command, Bash will check $PATH list of directories for the program that can run it. It is giving you that error because it can't find a command for rbenv in the list of directories.

Review the directions you are following for any step involving adding EXPORT $PATH to a dot (config) file like .bash_profile or .bashrc and make sure you have followed that step then run source .bash_profile or source .bashrc depending on the name of the cofig file. source is just a command that will run a shell script.

If you are looking for other options with less headaches, I suggest:

For installing Ruby locally I recommend the directions at Installrails.com.

But if you want to get up and running fast and free, nothing I have found beats Nitrous.io cloud-based virtual machines.