# "jekyll serve" does not work on vs code

**URL:** <https://talk.jekyllrb.com/t/jekyll-serve-does-not-work-on-vs-code/9020>\
**Category:** Help\
**Created:** [March 6, 2024, 10:01am UTC](https://talk.jekyllrb.com/t/jekyll-serve-does-not-work-on-vs-code/9020 "2024-03-06T10:01:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![timssys](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/timssys/32/5826_2.png) [@timssys](https://talk.jekyllrb.com/u/timssys)\
**Post date:** [March 6, 2024, 10:01am UTC](https://talk.jekyllrb.com/t/jekyll-serve-does-not-work-on-vs-code/9020/1 "2024-03-06T10:01:19Z")

</div>

Hi, I recently got a new computer and I moved my jekyll site to the computer and installed jekyll. When I run “jekyll serve” on the vs code terminal, it shows the following error:

````auto
PS C:\Users\ctimi\OneDrive\Pictures\Documents\GitHub\timssys_jekyll> jekyll serve
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.17/lib/bundler/runtime.rb:309:in `check_for_activated_spec!': You have already activated public_suffix 5.0.4, but your Gemfile requires public_suffix 4.0.7. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
        from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.17/lib/bundler/runtime.rb:25:in `block in setup'
        from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.17/lib/bundler/spec_set.rb:140:in `each'
        from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.17/lib/bundler/spec_set.rb:140:in `each'
        from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.17/lib/bundler/runtime.rb:24:in `map'
        from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.17/lib/bundler/runtime.rb:24:in `setup'
        from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.17/lib/bundler.rb:162:in `setup'
        from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-4.3.3/lib/jekyll/plugin_manager.rb:52:in `require_from_bundler'
        from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-4.3.3/exe/jekyll:11:in `<top (required)>'
        from C:/Ruby32-x64/bin/jekyll:25:in `load'
        from C:/Ruby32-x64/bin/jekyll:25:in `<main>'
PS C:\Users\ctimi\OneDrive\Pictures\Documents\GitHub\timssys_jekyll> ```
````

---

<div class="post-metadata">

**Author:** ![panchtatvam](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/panchtatvam/32/5512_2.png) [@panchtatvam](https://talk.jekyllrb.com/u/panchtatvam)\
**Post date:** [March 6, 2024, 11:47am UTC](https://talk.jekyllrb.com/t/jekyll-serve-does-not-work-on-vs-code/9020/3 "2024-03-06T11:47:04Z")

</div>

You can try installing bundles ( one time process ) first by

`bundle install`

and then start Jekyll by

`bundle exec jekyll serve`

---

<div class="post-metadata">

**Author:** ![digitigradeit](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/digitigradeit/32/4562_2.png) [@digitigradeit](https://talk.jekyllrb.com/u/digitigradeit)\
**Post date:** [March 8, 2024, 1:13am UTC](https://talk.jekyllrb.com/t/jekyll-serve-does-not-work-on-vs-code/9020/4 "2024-03-08T01:13:30Z")

</div>

This could also be due to the fact that integrated terminal windows in VScode doesn’t always use the path correctly, so you likely have to end up having to specify the path to the bundle exec on your system:

In my case it would be:

`/Users/brian/.asdf/shims/bundle exec jekyll serve`

You can also do:

`/Users/brian./.asdf/shims/bundle exec jekyll serve --livereload --trace --watch --drafts --host localhost --incremental --verbose`

This might also get increasingly complicated since, your package manager you used to install ruby, bundle, and Jekyll is also likely not integrated with VScode, for that you may also need to peruse through your system settings for things like PATH and `terminal.integrated` and adjust correctly.

Once I added

```auto
    "terminal.integrated.env.osx": {
            "PATH": "${env:PATH}"
    },

```

…to mine … Everything started to behave as expected.

Yours wouldn’t be `terminal.integrated.env.osx` it would be `terminal.integrated.env.windows`
