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.
When you run bundle exec jekyll serve, Bundler uses the gems and versions as specified in Gemfile. lock to ensure your Jekyll site builds with no compatibility or dependency conflicts. The Gemfile and Gemfile. lock files inform Bundler about the gem requirements in your site.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With