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-subsystem-for-linux/
I’ve been using Jekyll to create static websites on GitHub Pages, but I was unsure how to install it with dependencies I wasn’t used to (NodeJS & Ruby). Here is the easiest way to get Jekyll set up on your machine in just a couple of minutes.
TL;DR if you have Chocolatey installed the 2 commands are:
- choco install ruby -y
- gem install bundler
- gem install jekyll
Prerequisite – Chocolatey
You need to have Chocolatey installed on your machine. Chocolatey is the BEST way to install and keep applications updated on windows.
- Open a command prompt with Administrator access
- Install Chocolatey
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
- Close the command prompt as Chocolatey will not be available until you close and reopen.
Install dependencies & Jekyll
- Open a command prompt with Administrator access
- Install Ruby
choco install ruby -y
- Close and open a new command prompt with Administrator access
- Install gem bundler
gem install bundler - Install Jekyll
gem install jekyll
- UPDATE 2016/12/5: if you get an error about SSL, you will need to manually update Ruby Gems, because their certificate expired… Hopefully the new certificate will be bundled in the future
http://guides.rubygems.org/ssl-certificate-update/
Now you can use standard Jekyll commands to create a new site and serve it e.g.
jekyll new myblog
cd myblog
jekyll serve
Edits:
2016/12/05: Added details on how to get resolve the Ruby Gems certificate expiring. And added gem bundler which is a new requirement.
2015/12/05: From Jekyll 3.0 you do not need to install NodeJS. This brings it down to just 2 command prompt entries to install Jekyll
Works like a charm from my Windows 10 machine. Thank you! I was able to publish as Github pages.
A couple of questions (1): what to do to keep things updated and (2) how to install the “github-pages” gem that is mentioned in http://jekyllrb.com/docs/github-pages/ (or perhaps it is unnecessary?)
[…] available by people who were obviously more successful at it than we were. And there are even simpler ones that I discovered during the course of writing this post and that I wish existed three months […]
This is great, very useful! 🙂
Note that the chocolatey install line disappears off the page in chrome.
But thank you for the simple guide
Works for me on windows 10. Thank you very much.
Thank you. Works really well.
thank you
Thank you David, it works like a charm!
Hi,
Just FYI when I tried to install ruby that way I got the error:
C:\Windows\system32>choco install ruby
Installing the following packages:
ruby
By installing you accept licenses for the packages.
ruby not installed. The package was not found with the source(s) listed.
If you specified a particular version and are receiving this message, it is possible that the package name exists but t
he version does not.
Version: “”
Source(s): “https://chocolatey.org/api/v2/”
Chocolatey installed 0/1 package(s). 1 package(s) failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures:
– ruby
The solution was to run the following:
choco install ruby –version=2.2.4
first,I must cross The GreatWall.
this is a fantastic tutorial, found via: https://jekyllrb.com/docs/windows/#installation
One thing that I’m stuck on is post installation and serve I get a warning: “please add the following to your Gemfile to avoid polling for changes: gem ‘wdm’, ‘~> 0.1.0’ if Gem.win_platform?”. The main Jekyll site also recommends this.
What is the Gemfile, and how do I locate it locally?
The title of this article is really a false advertisment. To install the Ruby, you firstneed Chocholatey. To install that you need powershell.
The `gem` is another thing you probably need to install, but here the article author doesn’t even bother mention it.
`gem` is from ruby, and powershell is integrated to windows.
On Win 10 64 bit version 1511 and the latest Chocolately I got to the step: gem install jekyll
and got the following error:
ERROR: While executing gem … (Gem::RemoteFetcher::UnknownHostError)
no such name (https://api.rubygems.org/quick/Marshal.4.8/jekyll-3.1.3.gemspec.rz)
Any Ideas?
Working perfect on Windows 8.1 professional after upgrading Ruby.
Sooo easy! Is there a way to update ruby to 2.3.1?
Reblogged this on Золкаш.
Thank you
Worked perfectly on Win7 with no previous choco or ruby installation. Thanks!
If it was working properly, you could do this in one command:
choco install jekyll –source ruby
I’ve added an issue to fix this: https://github.com/chocolatey/choco/issues/884
Well, thanks for the guide, this guide works fine by default. But, the mybolg is created under system32. That would be very great if you can add more guides on how to create project in other folder as there are a lot of issues if simply following the original commands.
I tried to create it to other folder, but encountered a lot of issues. for example, I still need to install bundler, after install it, when I jekyll serve my blog, the page is empty and command message shows lots of files not found:
Error reading file C:/Tools/ruby23/lib/ruby/gems/2.3.0/gems/minima-1.0.1/_layouts/default.html: No such file or directory @ rb_sysopen – /Tools/ruby23/lib/ruby/gems/2.3.0/gems/minima-1.0.1/_layouts/default.html
Error reading file C:/Tools/ruby23/lib/ruby/gems/2.3.0/gems/minima-1.0.1/_layouts/page.html: No such file or directory @ rb_sysopen – /Tools/ruby23/lib/ruby/gems/2.3.0/gems/minima-1.0.1/_layouts/page.html
Error reading file C:/Tools/ruby23/lib/ruby/gems/2.3.0/gems/minima-1.0.1/_layouts/post.html: No such file or directory @ rb_sysopen – /Tools/ruby23/lib/ruby/gems/2.3.0/gems/minima-1.0.1/_layouts/post.html
Seems it is a path issue, I am an newbie on Ruby. Thanks for any advice.
Never mind. This is a stupid question
[…] Windows Version […]
Thanks for posting! However it was not so “easily” for me.
Everything went smooth until last step. But issuing “gem install jekyll” brought me this:
ERROR: Could not find a valid gem ‘jekyll’ (>= 0), here is why:
Unable to download data from https://rubygems.org/ – SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)
After doing some research I found the solution on the official site:
http://guides.rubygems.org/ssl-certificate-update/
And then you can
7. Start using jekyll
jekyll new
But you get a new
Dependency Error: Yikes! It looks like you don’t have bundler or one of its dependencies installed. In order to use Jekyll as currently configured, you’ll need to install this gem. The full error message from Ruby is: ‘cannot load such file — bundler’ If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/!
jekyll 3.3.0 | Error: bundler
So before that
6. Install bundler
gem install bundler
Hope this helps for anyone coming after me with the same problem 🙂
Thanks @David for the guide. Thanks @Joe for the tip on the certificated error. I have bumped into it straight ahead. Updating rubygems first and installing bundler saved my day. 🙂
I had the same problem, and your solution worked. Thanks!
Thanks for the workaround. I have updated the post with these extra details. Hopefully the new SSL cert gets bundled in the future.
same here, thanks for the code
thank you ,saved my time
You also need to install DevKit, otherwise `gem update` won’t work.
Fortunate we have this: https://chocolatey.org/packages/ruby2.devkit . Needs testing though.
I’m on windows 10 and am sooooo close. What does this mean? How do I fix this?
Figured it out! Thanks so much to the community for making me nerd out and solve problems. Thank you google. And thank you brain for not failing me. *accepts award*
Great post! But there is a typo at the command line for Chocolatey installation.
‘))” is missed after install.ps1.
@powershell -NoProfile -ExecutionPolicy Bypass -Command “iex ((New-Object System.Net.WebClient).DownloadString(‘https://chocolatey.org/install.ps1’))” && SET “PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin”
thank you, lovely job!
[…] Easily install Jekyll on Windows with 3 command prompt entries and Chocolatey […]
[…] Easily install Jekyll on Windows with 3 command prompt entries and Chocolatey […]
[…] 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 […]
Thanks a lot!
Still getting “‘jekyll’ is not recognized as an internal or external command, operable program or batch file” – any suggestions as to where I’m going wrong?
[…] available by people who were obviously more successful at it than we were. And there are even simpler ones that I discovered during the course of writing this post and that I wish existed three months […]
[…] available by people who were obviously more successful at it than we were. And there are even simpler ones that I discovered during the course of writing this post and that I wish existed three months […]
[…] available by people who were obviously more successful at it than we were. And there are even simpler ones that I discovered during the course of writing this post and that I wish existed three months […]
Just a post I was looking for. This is something that could give me information about what I needed to know.
Thanks a lot, testing and working
[…] accessible by people who were obviously more successful at it than we were. And there are even simpler ones that I discovered during the course of writing this post and that I please existed three months […]
It didn’t work… When I do the command “gem install jekyll” the following error appears:
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
current directory: C:/tools/ruby30/lib/ruby/gems/3.0.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
C:/tools/ruby30/bin/ruby.exe -I C:/tools/ruby30/lib/ruby/3.0.0 -r ./siteconf20210520-2132-gijlna.rb extconf.rb
creating Makefile
current directory: C:/tools/ruby30/lib/ruby/gems/3.0.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make DESTDIR\= clean
C:/tools/ruby30/lib/ruby/gems/3.0.0/gems/make-0.3.1/bin/make:4:in `’: undefined local variable or method `make’ for main:Object (NameError)
from C:/tools/ruby30/bin/make:23:in `load’
from C:/tools/ruby30/bin/make:23:in `’
current directory: C:/tools/ruby30/lib/ruby/gems/3.0.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make DESTDIR\=
C:/tools/ruby30/lib/ruby/gems/3.0.0/gems/make-0.3.1/bin/make:4:in `’: undefined local variable or method `make’ for main:Object (NameError)
from C:/tools/ruby30/bin/make:23:in `load’
from C:/tools/ruby30/bin/make:23:in `’
make failed, exit code 1
Gem files will remain installed in C:/tools/ruby30/lib/ruby/gems/3.0.0/gems/http_parser.rb-0.6.0 for inspection.
Results logged to C:/tools/ruby30/lib/ruby/gems/3.0.0/extensions/x64-mingw32/3.0.0/http_parser.rb-0.6.0/gem_make.out]
Can somebody help me?
[…] available by people who were obviously more successful at it than we were. And there are even simpler ones that I discovered during the course of writing this post and that I wish existed three months […]
[…] available by people who were obviously more successful at it than we were. And there are even simpler ones that I discovered during the course of writing this post and that I wish existed three months […]