Check ruby version before compilation