config: ruby: Get rid of an "eval" and an "exec" operating on generated code.

We can get the same result using importlib.