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

trouble installing rbenv

I have been following the steps to install ruby on mac but when I copy and paste the following command in bash

echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile

I get

-bash: /Users/ashnadabas/.bash_profile: Is a directory

similarly with

echo 'eval "$(rbenv init -)"' >> ~/.bash_profile

as a result of this, I am unable to run the rbenv command on my console as I get command not found. I am not sure what I can do to fix it. Any help would be appreciated. Thanks

1 Answer

For some reason you .bash_profile is a directory. You might want to see if there's anything in it with ls ~/.bash_profile. If there's nothing there then run rm -r ~/.bash_profile and re-run the rbenv commands. Alternatively you should be able to substitute ~/.bashrc for the ~/.bash_profile.