added ruby version check and some template tweaking