I've wished for the same kind of 'embed prolog in my ruby' for enumerating all possible cases, all invalid cases, etc in test suites. Interesting to know it's not just me!
uKanren is conceptually small and simple, here's a Ruby implementation: https://github.com/jsl/ruby_ukanren