Usage of ~ (tilde) changed in Ruby or Rails?

In my previous Rails 4 environment during initialization when environment.rb is being loaded I could require a file and in that file I had
require '~/app/models/ralph_lib/ralph_sql'
and the file would load.

Now, when I invoke webrick, I get the error
/home/mydomain/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require': cannot load such file -- ~/app/models/ralph_lib/ralph_sql (LoadError)

If, instead, I use
require '/home/mydomain/app/models/ralph_lib/ralph_sql'
or
require_relative '../app/models/ralph_lib/ralph_sql'
then ralph.sql loads successfuly