---
title: "Installing and Running Ruby with Jekyll on Visual Studio Codespaces"
date: 2020-05-19T00:00:00+00:00
author: "poornerd"
tags: ["ruby", "jekyll", "codespaces"]
canonical: https://www.poornerd.com/2020/05/19/installing-and-running-ruby-with-jekyll-on-vs-codespaces.html
source: Raw Markdown twin of the HTML article; content is the original source.
---
So ruby was not working out of the box, but I wanted to build and test my Jekyll blog directly in Visual Studio Codespaces.
After some experimentation, this is what I had to run in the terminal to get everything installed:
```
sudo apt-get install ruby
sudo apt-get install ruby-bundler
sudo gem install bundler
sudo gem install rubygems-update
update_rubygems
sudo gem update --system
sudo apt-get install ruby-dev
sudo gem install eventmachine -v '1.2.7'
```
![Visual Studio Codespaces - running Jekyll and Ruby](/images/posts/jekyll.png){:class="img-fluid w-100"}

After that your environment should be ready for Jekyll.  Then install the bundles, and start Jekyll:

```
bundle install 
bundle exec jekyll serve
```

After that it is running, and you can use our other [post on port forwarding from Visual Studio Codespaces]({% post_url 2020-05-18-developing-java-micronaut-visual-studio-codespaces %}) to access it in your browser. 
