First, make sure you have command line tools installed:
xcode-select --install
Then open Terminal.app and type:
curl https://gist.githubusercontent.com/DirtyF/5d2bde5c682101b7b5d90708ad333bf3/raw/fbc736fa1b50bd637929a315e6803df306c8bc8e/setup-rbenv.sh | bash
I have rbenv global 2.5.3 but still unable to use the command jekyll serve
Please help.