Solution to - Ruby error parsing 'Gemfile': incompatible library version

I was trying to run a ruby command: bundle update, as part of procedure that should ultimately result in getting my ruby gems in order. However, not coming from ruby environment I ended up with bunch of errors, as expected. Anyway, I hit the wall when trying to bundle update. You can see the so called wall below:

Read the error messages carefully

Luckily ruby devs seem to have pretty user-friendly mindset and coded up a helpful error message. Installing libyaml, however wasn`t an option, because the package has since then changed name plus I had the current version. Incompatible library version.... hmmm. This could be it. So I searched the folder and boom, no psych-2.2.4. All right then, perhaps its not so smart to refer to it, when it doesn`t exist.

Remove the reference

                    rm -rf /usr/local/rvm/gems/ruby-2.4.2/gems/psych-2.2.4

Reference removed, and bundle update ready to roll. I hope this post helped you on your ruby adventures, have a good one.