Test.rb:1:in `require': no such file to load -- yaml (LoadError)

Hello

I am trying to migrate my ruby from old server to new server.

I did a copy of all the binaries and have set all the relevant patch.
However I am not sure what I am missing. Below require works completely
fine on my old server. however , does not work fine in new server.

How can I know where is the yaml file located on the old server and any
advise how to fix this issue.

File Content:
require ‘yaml’
puts “Test”

test.rb:1:in `require’: no such file to load – yaml (LoadError)