Skip to content

Instantly share code, notes, and snippets.

@OnkelDom
Last active August 6, 2021 21:41
Show Gist options
  • Save OnkelDom/02ea7b679087d7f77e3531866d655825 to your computer and use it in GitHub Desktop.
Save OnkelDom/02ea7b679087d7f77e3531866d655825 to your computer and use it in GitHub Desktop.
Setup WSL Ubuntu to install ruby and use jekyll websites.

Installing Jekyll

Jekyll requires Ruby, so you’ll first need to install it. On Ubuntu, just run:

Install Ruby

sudo apt-get install ruby-full build-essential zlib1g-dev

Ensure RubyGems packages are installed under the user account instead of root.

echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Install Jekyll and Bundler:

gem install jekyll bundler

Site Creation

From your Linux shell, navigate to your GitHub repository created earlier and run:

jekyll new .
gem update
rm Gemfile.lock
bundle update

Run Testserver and Access with http://localhost:4000

bundle exec jekyll serve --drafts --livereload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment