I previously wrote how to install Jekyll on Windows by installing the Windows version of Ruby and then installing the gems that way. I have found another way install Jekyll via the Ubuntu version of Ruby. This is my preferred way now, as the Linux version of these tools are updated more frequently than the Windows versions.
1. Install Ubuntu bash on Windows
- Enable Windows subsystem for Linux.
Follow this short guide on how to enable it https://msdn.microsoft.com/en-us/commandline/wsl/install_guide - After following the steps in the guide above. Simply start the Ubuntu bash shell
2. Install Ruby & Jekyll
# Get Ubuntu up to date and install Ruby
sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt-get install -y build-essential ruby-full# update ruby gems and install Jekyll
sudo gem update –system
sudo gem install jekyll bundler
Then you can do the standard ‘jekyll new foldername` and `jekyll serve` to host it.
FYI: the error message in the screenshot about Bash on windows, no longer applies. As the Windows 10 Creators Edition resolved this issue
[…] UPDATE 2017/05/17: I now recommend using the “Windows 10 Subsystem for Linux” which provides an Ubuntu bash shell, to install and use Jekyll. This is how I use it myself.Install guide is here https://davidburela.wordpress.com/2017/05/17/how-to-install-jekyll-on-windows-10-with-windows-subsys… […]
I think there is a small change in the line. 🙂
# update ruby gems and install Jekyll
sudo gem update –system
Oh! it was just the way the double dashes are displayed. Sorry to bother you 🙂
If you have a Jekyll site that uses `github-pages` via a Gemfile you might have to run `apt-get install zlib1g-dev` so `nokogiri` can successfully install on WSL.
Thanks a lot!