# Unable to Run 'bundle exec jekyll serve' (beginner's issue)

**URL:** https://talk.jekyllrb.com/t/unable-to-run-bundle-exec-jekyll-serve-beginners-issue/6393
**Category:** Help
**Created:** [September 4, 2021, 7:32pm UTC](https://talk.jekyllrb.com/t/unable-to-run-bundle-exec-jekyll-serve-beginners-issue/6393 "2021-09-04T19:32:12Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![adriculous](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/adriculous/32/3863_2.png) [@adriculous](https://talk.jekyllrb.com/u/adriculous)
#### Post date: [September 4, 2021, 7:32pm UTC](https://talk.jekyllrb.com/t/unable-to-run-bundle-exec-jekyll-serve-beginners-issue/6393/1 "2021-09-04T19:32:12Z")

</div>

Hello, my first time using Jekyll (for an online course) and also first time posting here. I’ve searched around for any solutions provided for the error I came across during my initial setup.

I wanted to preview the site after its first installation (I haven’t made any changes yet, I just wanted to preview it on my web browser), so I typed in the `bundle exec jekyll serve` on my Terminal. Unfortunately, this was what I got:

```auto
Configuration file: /Users/adriculous/Dropbox/Udemy/Jekyll and Hugo/adrianne-dev/_config.yml
            Source: /Users/adriculous/Dropbox/Udemy/Jekyll and Hugo/adrianne-dev
       Destination: /Users/adriculous/Dropbox/Udemy/Jekyll and Hugo/adrianne-dev/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
       Jekyll Feed: Generating feed for posts
                    done in 0.668 seconds.
 Auto-regeneration: enabled for '/Users/adriculous/Dropbox/Udemy/Jekyll and Hugo/adrianne-dev'
                    ------------------------------------------------
      Jekyll 4.2.0 Please append `--trace` to the `serve` command
                     for any additional information or backtrace.
                    ------------------------------------------------

```

It’s supposed to give me an IP address that I can use to preview the newly-built Jekyll site on my browser, but I didn’t see it. I went ahead and entered `bundle exec jekyll serve --trace` and here are my results:

```auto
Configuration file: /Users/adriculous/Dropbox/Udemy/Jekyll and Hugo/adrianne-dev/_config.yml
            Source: /Users/adriculous/Dropbox/Udemy/Jekyll and Hugo/adrianne-dev
       Destination: /Users/adriculous/Dropbox/Udemy/Jekyll and Hugo/adrianne-dev/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
       Jekyll Feed: Generating feed for posts
                    done in 0.64 seconds.
 Auto-regeneration: enabled for '/Users/adriculous/Dropbox/Udemy/Jekyll and Hugo/adrianne-dev'
bundler: failed to load command: jekyll (/Users/adriculous/.gem/ruby/2.6.0/bin/jekyll)
Traceback (most recent call last):
	39: from /Users/adriculous/.gem/ruby/2.6.0/bin/bundle:23:in `<main>'
	38: from /Users/adriculous/.gem/ruby/2.6.0/bin/bundle:23:in `load'
	37: from /Users/adriculous/.gem/ruby/2.6.0/gems/bundler-2.2.26/exe/bundle:37:in `<top (required)>'
	36: from /Users/adriculous/.gem/ruby/2.6.0/gems/bundler-2.2.26/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
	35: from /Users/adriculous/.gem/ruby/2.6.0/gems/bundler-2.2.26/exe/bundle:49:in `block in <top (required)>'
	34: from /Users/adriculous/.gem/ruby/2.6.0/gems/bundler-2.2.26/lib/bundler/cli.rb:25:in `start'
	33: from /Users/adriculous/.gem/ruby/2.6.0/gems/bundler-2.2.26/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	32: from /Users/adriculous/.gem/ruby/2.6.0/gems/bundler-2.2.26/lib/bundler/cli.rb:31:in `dispatch'
	31: from /Users/adriculous/.gem/ruby/2.6.0/gems/bundler-2.2.26/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	30: from /Users/adriculous/.gem/ruby/2.6.0/gems/bundler-2.2.26/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	29: from /Users/adriculous/.gem/ruby/2.6.0/gems/bundler-2.2.26/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	28: from /Users/adriculous/.gem/ruby/2.6.0/gems/bundler-2.2.26/lib/bundler/cli.rb:477:in `exec'
	27: from /Users/adriculous/.gem/ruby/2.6.0/gems/bundler-2.2.26/lib/bundler/cli/exec.rb:23:in `run'
	26: from /Users/adriculous/.gem/ruby/2.6.0/gems/bundler-2.2.26/lib/bundler/cli/exec.rb:58:in `kernel_load'
	25: from /Users/adriculous/.gem/ruby/2.6.0/gems/bundler-2.2.26/lib/bundler/cli/exec.rb:58:in `load'
	24: from /Users/adriculous/.gem/ruby/2.6.0/bin/jekyll:23:in `<top (required)>'
	23: from /Users/adriculous/.gem/ruby/2.6.0/bin/jekyll:23:in `load'
	22: from /Library/Ruby/Gems/2.6.0/gems/jekyll-4.2.0/exe/jekyll:15:in `<top (required)>'
	21: from /Users/adriculous/.gem/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
	20: from /Users/adriculous/.gem/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
	19: from /Users/adriculous/.gem/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
	18: from /Users/adriculous/.gem/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
	17: from /Users/adriculous/.gem/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
	16: from /Library/Ruby/Gems/2.6.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
	15: from /Library/Ruby/Gems/2.6.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
	14: from /Library/Ruby/Gems/2.6.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `each'
	13: from /Library/Ruby/Gems/2.6.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
	12: from /Library/Ruby/Gems/2.6.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:102:in `process'
	11: from /Library/Ruby/Gems/2.6.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:215:in `start_up_webrick'
	10: from /Library/Ruby/Gems/2.6.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:215:in `new'
	 9: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/webrick/httpserver.rb:47:in `initialize'
	 8: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/webrick/server.rb:108:in `initialize'
	 7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/webrick/server.rb:127:in `listen'
	 6: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/webrick/utils.rb:65:in `create_listeners'
	 5: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/socket.rb:762:in `tcp_server_sockets'
	 4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/socket.rb:227:in `foreach'
	 3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/socket.rb:227:in `each'
	 2: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/socket.rb:764:in `block in tcp_server_sockets'
	 1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/socket.rb:201:in `listen'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/socket.rb:201:in `bind': Address already in use - bind(2) for 127.0.0.1:4000 (Errno::EADDRINUSE)

```

The ones that stood out for me from that error are `bundler: failed to load command: jekyll (/Users/adriculous/.gem/ruby/2.6.0/bin/jekyll)` and the last line: `1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/socket.rb:201:in `listen’  
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/socket.rb:201:in `bind': Address already in use - bind(2) for 127.0.0.1:4000 (Errno::EADDRINUSE)`

I don’t know how to fix these errors, so I decided to ask everyone here to guide me through these steps. Any suggestions on how I can fix this?

I’m using macOS (Big Sur) as my OS.

Thank you!

---

<div class="post-metadata">

### Author: ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)
#### Post date: [September 5, 2021, 1:13am UTC](https://talk.jekyllrb.com/t/unable-to-run-bundle-exec-jekyll-serve-beginners-issue/6393/2 "2021-09-05T01:13:18Z")

</div>

it looks like you have ruby installed in 2 places and it is confused. If you look at the output sometimes it is in /Library and other times it is in /System.

How did you install ruby? what OS?

Try uninstalling ruby and re-installing it.

---

<div class="post-metadata">

### Author: ![adriculous](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/adriculous/32/3863_2.png) [@adriculous](https://talk.jekyllrb.com/u/adriculous)
#### Post date: [September 5, 2021, 11:07pm UTC](https://talk.jekyllrb.com/t/unable-to-run-bundle-exec-jekyll-serve-beginners-issue/6393/3 "2021-09-05T23:07:48Z")

</div>

```auto
How did you install ruby? what OS?

```

As I mentioned at the bottom of my original post, I’m using macOS (Big Sur). I read that it was already installed in my system, so I didn’t directly install ruby then. I also read that I shouldn’t use the ruby that’s already pre-installed in the system, so I installed ruby on another path.

I went ahead and installed ruby via Homebrew. I even changed the $PATH so that the system would read the ruby installed on that particular path. When I typed `which -a ruby`, it’s now installed in these two paths:

```auto
/usr/local/opt/ruby/bin/ruby
/usr/bin/ruby

```

When I entered `which ruby` in my Terminal, `/usr/local/opt/ruby/bin/ruby` came out as a result, so I thought that should fix it. I uninstalled and re-installed Jekyll and followed along the instructions and recreated a new project folder.

Once again, I want to view the newly-built site with `bundle exec jekyll serve`. It still didn’t work and gave me these errors:

```auto
Configuration file: /Users/adriculous/Dropbox/Udemy/Jekyll and Hugo/adriannedev/_config.yml
            Source: /Users/adriculous/Dropbox/Udemy/Jekyll and Hugo/adriannedev
       Destination: /Users/adriculous/Dropbox/Udemy/Jekyll and Hugo/adriannedev/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
       Jekyll Feed: Generating feed for posts
                    done in 3.422 seconds.
 Auto-regeneration: enabled for '/Users/adriculous/Dropbox/Udemy/Jekyll and Hugo/adriannedev'
                    ------------------------------------------------
      Jekyll 4.2.0 Please append `--trace` to the `serve` command
                     for any additional information or backtrace.
                    ------------------------------------------------
/usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve/servlet.rb:3:in `require': cannot load such file -- webrick (LoadError)
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve/servlet.rb:3:in `<top (required)>'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:179:in `require_relative'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:179:in `setup'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:100:in `process'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `each'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
	from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
	from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
	from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
	from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
	from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/exe/jekyll:15:in `<top (required)>'
	from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `load'
	from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `<top (required)>'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/cli/exec.rb:58:in `load'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/cli/exec.rb:58:in `kernel_load'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/cli/exec.rb:23:in `run'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/cli.rb:477:in `exec'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/cli.rb:31:in `dispatch'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/cli.rb:25:in `start'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/exe/bundle:49:in `block in <top (required)>'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/exe/bundle:37:in `<top (required)>'
	from /usr/local/opt/ruby/bin/bundle:23:in `load'
	from /usr/local/opt/ruby/bin/bundle:23:in `<main>'

```

I don’t know what’s going on anymore. Please advise?

Thank you!

---

<div class="post-metadata">

### Author: ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)
#### Post date: [September 5, 2021, 11:36pm UTC](https://talk.jekyllrb.com/t/unable-to-run-bundle-exec-jekyll-serve-beginners-issue/6393/4 "2021-09-05T23:36:45Z")

</div>

progress I think, now it looks like you are using ruby 3 which isn’t quite supported yet? though I think you just need to manually install webrick?

there are a few threads in here about what you need to use ruby 3, it wasn’t much.

---

<div class="post-metadata">

### Author: ![adriculous](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/adriculous/32/3863_2.png) [@adriculous](https://talk.jekyllrb.com/u/adriculous)
#### Post date: [September 6, 2021, 5:03am UTC](https://talk.jekyllrb.com/t/unable-to-run-bundle-exec-jekyll-serve-beginners-issue/6393/5 "2021-09-06T05:03:52Z")

</div>

I tried to add webrick `gem install webrick`. Then I attempted to run `bundle exec jekyll serve` again, then gave me the following result:

```auto
Configuration file: /Users/adriculous/Dropbox/Udemy/Jekyll and Hugo/adriannedev/_config.yml
            Source: /Users/adriculous/Dropbox/Udemy/Jekyll and Hugo/adriannedev
       Destination: /Users/adriculous/Dropbox/Udemy/Jekyll and Hugo/adriannedev/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
       Jekyll Feed: Generating feed for posts
                    done in 0.72 seconds.
 Auto-regeneration: enabled for '/Users/adriculous/Dropbox/Udemy/Jekyll and Hugo/adriannedev'
                    ------------------------------------------------
      Jekyll 4.2.0 Please append `--trace` to the `serve` command
                     for any additional information or backtrace.
                    ------------------------------------------------
/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/socket.rb:201:in `bind': Address already in use - bind(2) for 127.0.0.1:4000 (Errno::EADDRINUSE)
	from /usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/socket.rb:201:in `listen'
	from /usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/socket.rb:765:in `block in tcp_server_sockets'
	from /usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/socket.rb:227:in `each'
	from /usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/socket.rb:227:in `foreach'
	from /usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/socket.rb:763:in `tcp_server_sockets'
	from /usr/local/lib/ruby/gems/3.0.0/gems/webrick-1.7.0/lib/webrick/utils.rb:60:in `create_listeners'
	from /usr/local/lib/ruby/gems/3.0.0/gems/webrick-1.7.0/lib/webrick/server.rb:130:in `listen'
	from /usr/local/lib/ruby/gems/3.0.0/gems/webrick-1.7.0/lib/webrick/server.rb:111:in `initialize'
	from /usr/local/lib/ruby/gems/3.0.0/gems/webrick-1.7.0/lib/webrick/httpserver.rb:47:in `initialize'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:215:in `new'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:215:in `start_up_webrick'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:102:in `process'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `each'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
	from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
	from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
	from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
	from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
	from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/exe/jekyll:15:in `<top (required)>'
	from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `load'
	from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `<top (required)>'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/cli/exec.rb:58:in `load'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/cli/exec.rb:58:in `kernel_load'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/cli/exec.rb:23:in `run'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/cli.rb:477:in `exec'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/cli.rb:31:in `dispatch'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/cli.rb:25:in `start'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/exe/bundle:49:in `block in <top (required)>'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
	from /Users/adriculous/.gem/ruby/3.0.0/gems/bundler-2.2.27/exe/bundle:37:in `<top (required)>'
	from /usr/local/opt/ruby/bin/bundle:23:in `load'
	from /usr/local/opt/ruby/bin/bundle:23:in `<main>'

```

I don’t understand what this means or what error it’s giving me now: `/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/socket.rb:201:in `bind’: Address already in use - bind(2) for 127.0.0.1:4000 (Errno::EADDRINUSE)`

I’m also looking into another static site generator in case Jekyll wouldn’t work for me, but I’m determined to make it work.

Please help, thank you.

---

<div class="post-metadata">

### Author: ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)
#### Post date: [September 6, 2021, 6:20am UTC](https://talk.jekyllrb.com/t/unable-to-run-bundle-exec-jekyll-serve-beginners-issue/6393/6 "2021-09-06T06:20:56Z")

</div>

> [@adriculous](#):
>
> 127.0.0.1:4000

if you paste that address in the browser is there something there? sounds like it is saying port 4000 is in use already.

Here is another thread that may help:

> [@Incompatible with the current version, ruby 3.0](https://talk.jekyllrb.com/t/incompatible-with-the-current-version-ruby-3-0/5821/4):
>
> brew install ruby@2.7 My guide [Install Ruby and Bundler · GitHub](https://gist.github.com/MichaelCurrin/fb758aea4d35e03b9ed093afddf4e7ec)

---

<div class="post-metadata">

### Author: ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)
#### Post date: [September 6, 2021, 7:27am UTC](https://talk.jekyllrb.com/t/unable-to-run-bundle-exec-jekyll-serve-beginners-issue/6393/7 "2021-09-06T07:27:31Z")

</div>

Indeed another instance of Jekyll is likely running. I’ve never seen other tools using port 4000

Of course just visit that address on 4000 and it will show you a page anyway and you can see what was already running

---

<div class="post-metadata">

### Author: ![Ahmed-Shafee](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/ahmed-shafee/32/5057_2.png) [@Ahmed-Shafee](https://talk.jekyllrb.com/u/Ahmed-Shafee)
#### Post date: [January 3, 2023, 8:43pm UTC](https://talk.jekyllrb.com/t/unable-to-run-bundle-exec-jekyll-serve-beginners-issue/6393/8 "2023-01-03T20:43:53Z")

</div>

hello  
i have the same problem , and excatly same erro : Generating…  
Jekyll Feed: Generating feed for posts  
Liquid Exception: undefined method `untaint’ for “Welcome to Jekyll!”:String in C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/minima-2.5.1/\_layouts/post.html

but i’m using windows 11 ,  
i have: ruby 3.2.0  
gem 3.4.1  
jeklly 4.3.1

i exactly installed ruby twice , but then i uninstalled one version

how can i fix the bug , it’s first time that i try to do : bundle exec jekyll serve

will be very happy if someone can help me 🙂

---

<div class="post-metadata">

### Author: ![rubymuby](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rubymuby/32/4161_2.png) [@rubymuby](https://talk.jekyllrb.com/u/rubymuby)
#### Post date: [January 4, 2023, 9:34am UTC](https://talk.jekyllrb.com/t/unable-to-run-bundle-exec-jekyll-serve-beginners-issue/6393/9 "2023-01-04T09:34:56Z")

</div>

Can you add this `gem "webrick"` in your gemfile and try again

---

<div class="post-metadata">

### Author: ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)
#### Post date: [January 4, 2023, 4:44pm UTC](https://talk.jekyllrb.com/t/unable-to-run-bundle-exec-jekyll-serve-beginners-issue/6393/10 "2023-01-04T16:44:59Z")

</div>

looks like a ruby version issue?

> <https://github.com/jekyll/jekyll/issues/9233>
>
> \### Operating System
> 
> Ubuntu 22.04
> 
> \### Ruby Version
> 
> ruby 3.2.0 (2022-12-25 rev…ision a528908271) \[x86\_64-linux\]
> 
> \### Jekyll Version
> 
> jekyll 3.9.2
> 
> \### GitHub Pages Version
> 
> \_No response\_
> 
> \### Expected Behavior
> 
> I am able to serve a basic Jekyll site with 
> \`bundle exec jekyll serve\`
> 
> \### Current Behavior
> 
> "Liquid Exception: undefined method \`untaint' for "Welcome to Jekyll!":String in /\_layouts/post.html
> jekyll 3.9.2 | Error: undefined method \`untaint' for "Welcome to Jekyll!":String
> /home/thuston/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/liquid-4.0.3/lib/liquid/standardfilters.rb:42:in \`escape': undefined method \`untaint' for "Welcome to Jekyll!":String (NoMethodError)"
> 
> I tried to update my blog after ignoring it for some time and was unable to do so, every time I tried to Jekyll Serve I would get the error "Liquid Exception: undefined method \`tainted?' for "Code":String in /\_layouts/page.html"
> 
> Wasn't able to find an immediate fix so I removed Ubuntu from WSL, installed 22.04, re-installed Jekyll and everything, got the same error. So then I created a new Jekyll site with just \`jekyll new test\`, tried to serve that, and for the error listed above.
> 
> So fresh Linux install, fresh Jekyll install, fresh site. Any ideas?
> 
> \### Relevant log output
> 
> \_No response\_
> 
> \### Code Sample
> 
> \_No response\_

---

<div class="post-metadata">

### Author: ![HawesRT](https://avatars.discourse-cdn.com/v4/letter/h/77aa72/32.png) [@HawesRT](https://talk.jekyllrb.com/u/HawesRT)
#### Post date: [January 10, 2023, 10:45pm UTC](https://talk.jekyllrb.com/t/unable-to-run-bundle-exec-jekyll-serve-beginners-issue/6393/11 "2023-01-10T22:45:06Z")

</div>

Hello, I also had this issue and looked into it this is what I found to work for me.

Note: I am running this environment  
gem -v  
3.4.3

ruby -v  
ruby 3.2.0 (2022-12-25 revision a528908271) [x64-mingw-ucrt]

Windows 11  
Git

* * *

I found this link here on the official jekyll github page: [Issue with ref to solution](https://github.com/jekyll/jekyll/issues/9233)

The last comment mentions they pushed a patch and you have to edit your “Gemfile” file, you will have to comment out

**gem “jekyll”, “~\> 4.3.1”**

And replace with

**gem “jekyll”, github: “jekyll/jekyll”, ref: “refs/pull/9248/head”**

Then you should be able to successfully run

**bundle exec jekyll serve**

Hopefully this helps.
