I setup my system yesterday according to the directives in the “Setting up a Development Environment” section. I’m fairly confident that I finished the setup correctly, but when I checked my Ruby version today, it shows I have 2.3.7 installed (rather than 2.3.1) and the version of Ruby being used doesn’t seem to be linked to rbenv.
Is there a way for me to diagnose what might have happened on my end?
It won’t be too big of an issue if it’s the wrong Ruby version especially since it’s newer, but it could be a frustrating issue if you have competing ruby version managers(rbenv and rvm).
Before we get into the troubleshooting, can you try the commands from rbenv global 2.3.1 again? It could have been a typo or something that didn’t set the system’s ruby to the right version.
If that doesn’t fix it, here are some troubleshooting steps:
Can you type in your command line the following and post a screenshot? which rbenv which rvm rbenv version
The other thing we should check is your .bashrc file, which stores some of the configuration settings for your terminal. In your root directory, type atom .bashrc to open the file in atom. We’re looking for two lines that look exactly like this: export PATH="$HOME/.rbenv/bin:$PATH" eval "$(rbenv init -)"
If it doesn’t have these two lines exactly, go ahead and copy paste these in and save the file.
I re-entered the commands from rbenv global 2.3.1 again, and the results of the commands you listed are below. The command “which rvm” didn’t produce anything in the terminal.
My .bashrc file contained the correct lines, and is below as well. It only contained those two lines.
One additional bit of information that may help clarify:
When I open a new terminal window, and check the source of my Ruby version, I see the incorrect pathway. If I run source ~/.bashrc and then check, I see the correct pathway from rbenv. Is my terminal not supposed to use the rbenv path by default?
It looks like something’s up with the global setting, especially since it isn’t saving. I wouldn’t worry about it for now since it won’t keep you from working on the rest of the alpha course. Just keep it in mind if you suddenly are receiving errors when installing gems or upgrading to new versions of Ruby.
The important takeaway here is that we’ve made sure that rvm isn’t on your computer muddling things up.
Hey John,
Sorry for the miscommunication!
I meant that because the ruby versions are so similar, you’ll probably be able to get along just fine without needing to do any work-around.