This is awfully complicated.  Please replace the body of this function with

```
(condition-case nil
    (car (process-lines "ruby" "-e" "puts RUBY_VERSION"))
  (error nil))
```