Specified Ruby version not showing as default


#1

Hello… Running through the “Installing Ruby” of the Odin project course. Everything up through specifying the default version works perfect. I specify the following:

$ rbenv glogal 2.5.3

I am then instructed to check the correct version output with ruby -v. I should see:

$ ruby -v
ruby 2.5.3p82 (2018-09-12)

Instead I receive:

ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]

How do I default to my specified version?

Thank you!
Brian


#2

What is the output of echo $PATH?


#3

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin


#4

It looks like rbenv has not been set up properly. What OS are you using?


#5

MacOS Mojave 10.14


#6

What does cat ~/.bash_profile output?


#7

alias textedit='open -a TextEdit’eval “$(rbenv init -)”


#8

Are you using VSCode?


#9

That is correct


#10

Type code ~/.bash_profile and check that the eval "$(rbenv init -)" is on it’s own line. If it isn’t move it to it’s own line and save the file. Then close and open a new terminal and then try ruby -v


#11

ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]

That did it! Thank you for the help!

Was on the same line asalias textedit='open -a TextEdit’

Is it normal for that to happen?


#12

Not usually. If I hear of it happening with anyone else I’ll investigate.

Glad you got it working.


#13

Thanks again