Jekyll theme site works locally without doing the install procedure

Newb asking questions again. I’m editing a Jekyll theme from scratch, in a new folder, on my local machine, and when I copy all the theme files from the zip into the new folder and run the bundle exec jekyll serve on that directory in command prompt, the site shows up and works normally on localhost:4000

However, the theme readme says that after downloading the zip, I should first install the theme by running bundle install / bundle exec jekyll build

My question is (again, I’m new) why is the website working if I skip the install step?

caveat: I don’t use bundler so what I say may not be as accurate as it could be.

Bundler is a dependency manager kind of thing - it tries to make the same site install exactly the same in different places. This could be important if you have a lot of weird dependencies that are hard to get the correct versions for. For example 2 people are working on the same repo, 1st person has it all setup and wants to get the 2nd person to have the same exact dependencies installed - this could be as simple as the same jekyll version. Without bundler the 2nd person may install the latest version of jekyll when maybe that won’t work with some other thing. Bundler helps control this.

If you have a simple site without any weird plugins it is likely that it will work with different jekyll versions and other ruby gems no problem and you and I could both have it and be using different versions of things and no one will notice.

So by just doing bundle execute I think you skipped the sync step of bundle install and maybe got lucky that everything worked as it should - you probably already had all the things installed or there just aren’t any things that are picky.

My sites are simple, no external plugins or odd gems, just straight vanilla jekyll so I don’t bother with a gem file or bundler and it all just works. Usually.

1 Like

Hey thanks so much for your reply! I’m very new to this and it does sound bit overwhelming googling and youtubing things around, a lot of new phrases in this for me and a lot of youtube tutorials that pop up first are just full of fluff…or I’m impatient idk :smiley:

So to be properly safe, before going into any big edits, I should put the theme files in a new folder, and execute all three commands in proper order to be safe - but if I decide to work on a site later down the line, only bundle exec jekyll serve should be executed. Is this a good way to put it? Can anything bad happen if I run bundle install / bundle exec jekyll build on the same folder more than once?

I don’t think so.

As I said, I am not a bundler user, so not sure on all the best ways. I would try to not need it.

I think you only need to do bundle install if it is new or you added something to the gem file? if you have already done bundle install on the project locally I think you don’t need to do it again unless you change some dependency.