9
votes

I'm currently learning Jekyll, a framework for building websites, and I don't know what's the difference between bundle exec jekyll serve and jekyll serve. Both seem to behave the same.

1

1 Answers

13
votes

In two words:

bundle exec jekyll serve - runs the exact jekyll server version that is specified in your Gemfile/Gemfile.lock.

jekyll serve - runs some version of jekyll server, which may or may not be the one you want.

For best results, always use bundle exec. On my machine, I have a shell alias for it, so that I can type

be jekyll serve