Move ruby version to constant

We have moved ruby version to constant variable and removed unnecessary code