Q: What is the difference in how Valentina for Ruby is implemented vs Ruby on Rails?
Valentina for Ruby contains a driver (written in C) which works directly with Ruby, and for Ruby on Rails, as an adapter (written in Ruby). Internally, the Valentina ADK uses the driver.
Q: Against which version was Valentina for Ruby compiled?
V4RUBY sources are compiled against the 1.9.3 Ruby headers and the driver successfully works with Ruby 2.4.X environment (with no indication that 2.5.x doesn't work).