--- title: Jekyll on Windows permalink: /docs/installation/windows/ redirect_from: - /docs/windows/ --- While Windows is not an officially-supported platform, it can be used to run Jekyll with the proper tweaks. This page aims to collect some of the general knowledge and lessons that have been unearthed by Windows users. ## Installing Jekyll The easiest way to run Jekyll is by using the [RubyInstaller](https://rubyinstaller.org/) for Windows. ### Installation via RubyInstaller [RubyInstaller](https://rubyinstaller.org/) is a self-contained Windows-based installer that includes the Ruby language, an execution environment, important documentation, and more. We only cover RubyInstaller-2.4 and newer here, older versions need to [install the Devkit](https://github.com/oneclick/rubyinstaller/wiki/Development-Kit) manually. 1. Download and Install a **Ruby+Devkit** version from [RubyInstaller Downloads](https://rubyinstaller.org/downloads/). Use default options for installation. 2. Open a new command prompt window from the start menu, so that changes to the `PATH` environment variable becomes effective. Install Jekyll and Bundler via: `gem install jekyll bundler` 3. Check if Jekyll installed properly: `jekyll -v` That's it, you're ready to use Jekyll! ### Encoding If you use UTF-8 encoding, make sure that no `BOM` header characters exist in your files or very, very bad things will happen to Jekyll. This is especially relevant when you're running Jekyll on Windows. Additionally, you might need to change the code page of the console window to UTF-8 in case you get a "Liquid Exception: Incompatible character encoding" error during the site generation process. It can be done with the following command: ```sh chcp 65001 ``` ### Time-Zone Management Since Windows doesn't have a native source of zoneinfo data, the Ruby Interpreter would not understand IANA Timezones and hence using them had the `TZ` environment variable default to UTC/GMT 00:00. Though Windows users could alternatively define their blog's timezone by setting the key to use POSIX format of defining timezones, it wasn't as user-friendly when it came to having the clock altered to changing DST-rules. Jekyll now uses a rubygem to internally configure Timezone based on established [IANA Timezone Database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). While 'new' blogs created with Jekyll v3.4 and greater, will have the following added to their `Gemfile` by default, existing sites *will* have to update their `Gemfile` (and installed) to enable development on Windows: ```ruby # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] ```
v2.0
of the TZInfo library has introduced a change in how timezone offsets are calculated.
This will result in incorrect date and time for your posts when the site is built with Jekyll 3.x on Windows.
We therefore recommend that you lock the Timezone library to v1.2
and above by listing
gem 'tzinfo', '~> 1.2'
in your Gemfile
.
If the `jekyll new` command prints the error "Your user account isn't allowed to install to the system RubyGems", see the "Running Jekyll as Non-Superuser" instructions in Troubleshooting.