How to install jekyll in Mac

This blog tells you how to install jekyll on mac. JEKYLL is a simple, blog-aware, static site generator for personal, project, or organization sites, written in Ruby.

Steps to install

1. First install Homebrew using following command :-
     /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2. Then check which ruby version is installed in the system using ruby -v. If available version is >= 2.3.0 then you can      ignore this step, else open the terminal and run
     curl -sSL https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer | bash -s stable
     When this is complete, you need to restart your terminal for the rvm command to work.
     Now, run rvm list known
     This shows the list of versions of the ruby.
     Now, run rvm install ruby-2.4.2
     if you type ruby -v in the terminal, you should see ruby 2.4.2.
     If it still shows you ruby 2.0., run rvm use ruby-2.4.2 --default.

Now you are done with ruby installation. Lets move to installing jekyll

3. To install JEKYLL run
     gem install jekyll
    This might give you some permission denied error, like permission denied for
     /Library/Ruby/Gems/2.0.0/public_suffix-4.0.1.gem
     Then run sudo chown -R $(whoami) /Library/Ruby/Gems/*
     and again run gem install jekyll and run gem install bundler to install bundler

Congratulations !! You're done