I am currently on the Alpha Course following the instructions to install rbenv and Ruby on my mac. After following all the instructions I was checking if I installed it correctly and this is what it displayed when I typed “which ruby” into my terminal:
This is different to what it should display and I am not sure how to fix this problem. Can someone please help me?
Here’s a couple of troubleshooting steps to follow that clear up 90% of cases. They’ll also help us establish a baseline if we need to do further troubleshooting.
Can you enter a couple of commands in a terminal in your root/home directory and screenshot the answers?
Also, can you open your .bashrc in atom like so and confirm it has the following text saved in it?
to open -->
then check to make sure it has the following with no errors:
eval "$(rbenv init -)"
If it already has those lines, can you open up your bash_profile and make sure it has the following line?
to open -->
After all that, we’ll check our results:
rbenv global 2.5.1
These are the answers that came out when I entered these commands into my terminal:
I also checked the texts in atom and there are no problems with them. It has all the lines that you told me to look for.
Looks to me like
which ruby is returning the correct file path now.