Likely a difference in the environment.
For example, to serve from the production environment:
env JEKYLL_ENV=production bundle exec jekyll serve
And to build:
env JEKYLL_ENV=production bundle exec jekyll build
I have a simple Rakefile I use so I don't have to type it out all the time.