I recently encountered the error above when I was running selenium tests.
Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)
Thanks to a post on stackoverflow Show archive.org snapshot I found out that clearing all files in tmp/cache in my project folder made the issue go away.