Can't run `netlify dev` on Linux with Jekyll and Ruby

Hi, folks! I’m quite excited by Netlify Dev and being able to run redirect rules in my development environment. I have not managed to get started. Please ask me for whatever information might help!

I have a Jekyll 3.4.0 blog running on Ruby 2.4.3 with Bundler 1.17.1. I’m running npm 6.7.0. The command netlify dev dies with this error:

bundler: failed to load command: jekyll (/home/jbrains/.rbenv/versions/2.4.3/bin/jekyll)
OptionParser::AmbiguousOption: ambiguous option: -l
  /home/jbrains/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:31:in `go'
  /home/jbrains/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
  /home/jbrains/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/jekyll-3.4.0/exe/jekyll:13:in `<top (required)>'
  /home/jbrains/.rbenv/versions/2.4.3/bin/jekyll:23:in `load'
  /home/jbrains/.rbenv/versions/2.4.3/bin/jekyll:23:in `<top (required)>'

I’ll try upgrading dependencies, but maybe one of you has an idea what’s wrong that upgrading dependencies won’t fix.


Aha! I upgraded to Jekyll 3.8.5 on Ruby 2.4.3 with Bundler 2.0.2 and npm 6.7.0. Some combination of those versions seems to have helped Netlify Dev to work.

Aha no! Sadly, I’m still fighting.

Configuration file: (path)/_config.yml
            Source: source/
       Destination: (destination-path)
 Incremental build: disabled. Enable with --incremental
                    done in 11.574 seconds.
 Auto-regeneration: enabled for 'source/'
jekyll 3.8.5 | Error:  Address already in use - bind(2) for
LiveReload address:


Aha! Aha! NoMachine server was running on port 4000. How do I tell netlify dev to run Jekyll on another port?

If I look at the netlify-dev-plugin project, it seems that port 4000 is hardcoded for Jekyll. Does that mean I’m out of luck for now? It really wasn’t in my plans today to try to figure out how to generalize that parameter. :slight_smile:

Aha! Aha! Aha! I managed to work around the issue. Could I have done this any more easily?


  port = 4001
  command = "bundle exec jekyll serve --incremental --port 4001"

For some reason, it appears that I need to specify the port in both places. :man_shrugging:

@jbrains thank you so much for keeping us posted as to how this developed! I’ve passed this on to the team working on Netlify Dev!

Let us know if anything else comes up!

1 Like

you are always welcome to contribute since you know this as well as us now :slight_smile: