Help with install ruby 2.6.5


I’ve been trying to install ruby v2.6.5 to no avail. I have the following error when I log in.

Last login: Tue Mar 24 11:13:59 on ttys000
-bash: /Users/dalijimmysoh/.bash_profile: line 15: unexpected EOF while looking for matching `"’
-bash: /Users/dalijimmysoh/.bash_profile: line 16: syntax error: unexpected end of file

And ruby -v result in the following:
[Dalis-MBP]: ~$ ruby -v
ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin17]


Ok, without knowing what you’ve done so far it’s not easy to help. Did you run rbenv install 2.6.5 --verbose ?


Yes, I’ve ran rbenv install 2.6.5 --verbose, installation went without a problem
Running ~$ ruby -v
ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin17]

I’m not able to get v2.6.5


Ok, you did the install. Did you follow that with rbenv global 2.6.5 before checking the version?


Yup, I had some help yesterday from @DaeguDude but I’m still unable to resolve the issue


Then I’m out of ideas beyond wiping ruby and starting from the beginning! The bash error indicates there’s something missing from the script but since WE haven’t written any bash scripts I’m not sure where it’s coming from. It may be something hidden in the commands we’re running to install things. So it could be a bad patch to an existing file, a glitch in the download that caused part of the file to corrupt or who knows what else. The install isn’t that lengthy so you might just try removing everything you installed in the ruby steps and start fresh.


Sorry but I’m a beginner in Ruby. Do you mind helping me? How do I remove everything? Does

$ ruby uninstall

do the trick? Or do I need something else?


Since it was cloned in I’m not sure how to make sure it’s fully removed and I’m hesitant to offer advice that may do more harm than good. Have you joined the discord for The Odin Project? The mods there are very helpful and way more knowledgeable than I am.