Whichlang is a rust library that detects languages. There were no Ruby bindings so I made one.