Use the rbenv global ruby for ruby syntax checking