Fail to run bundle exec jekyll serve

I am having trouble running jekyll in my terminal.

The error message is stated below:

PS D:\Venice\DLSU\ARW\workshop\arw-2021> bundle exec jekyll serve
Configuration file: D:/Venice/DLSU/ARW/workshop/arw-2021/_config.yml
            Source: D:/Venice/DLSU/ARW/workshop/arw-2021
       Destination: D:/Venice/DLSU/ARW/workshop/arw-2021/_site
 Incremental build: disabled. Enable with --incremental       
      Generating... 
       Jekyll Feed: Generating feed for posts
                    ------------------------------------------------
      Jekyll 4.2.0   Please append `--trace` to the `serve` command 
                     for any additional information or backtrace.   
                    ------------------------------------------------
C:/Ruby30-x64/lib/ruby/3.0.0/fileutils.rb:1415:in `initialize': Permission denied @ rb_sysopen - D:/Venice/DLSU/ARW/workshop/arw-2021/_site/assets/img/arw-banner.png (Errno::EACCES)
        from C:/Ruby30-x64/lib/ruby/3.0.0/fileutils.rb:1415:in `open'
        from C:/Ruby30-x64/lib/ruby/3.0.0/fileutils.rb:1415:in `block in copy_file'
        from C:/Ruby30-x64/lib/ruby/3.0.0/fileutils.rb:1414:in `open'
        from C:/Ruby30-x64/lib/ruby/3.0.0/fileutils.rb:1414:in `copy_file'
        from C:/Ruby30-x64/lib/ruby/3.0.0/fileutils.rb:1379:in `copy'
        from C:/Ruby30-x64/lib/ruby/3.0.0/fileutils.rb:500:in `block in copy_entry'
        from C:/Ruby30-x64/lib/ruby/3.0.0/fileutils.rb:1513:in `wrap_traverse'
        from C:/Ruby30-x64/lib/ruby/3.0.0/fileutils.rb:497:in `copy_entry'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/static_file.rb:200:in `copy_file'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/static_file.rb:110:in `write'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:231:in `block in write'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:358:in `block (2 levels) in each_site_file'     
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:357:in `each'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:357:in `block in each_site_file'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:356:in `each'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:356:in `each_site_file'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:230:in `write'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:82:in `process'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:28:in `process_site'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:65:in `build'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:36:in `process'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'  
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `each'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/exe/jekyll:15:in `<top (required)>'
        from C:/Ruby30-x64/bin/jekyll:23:in `load'
        from C:/Ruby30-x64/bin/jekyll:23:in `<main>'

How can I fix this problem?

maybe that first line of the error tells you?

C:/Ruby30-x64/lib/ruby/3.0.0/fileutils.rb:1415:in `initialize’: Permission denied @ rb_sysopen - D:/Venice/DLSU/ARW/workshop/arw-2021/_site/assets/img/arw-banner.png (Errno::EACCES)

what is this file:
D:/Venice/DLSU/ARW/workshop/arw-2021/_site/assets/img/arw-banner.png

it says permission denied on that file - could be that file or maybe the whole project? Try removing it and see if it works?

Follow the instructions at the top to run with --trace.

Please append --trace to the serve command

The logs are your friend and you’re lucky when they tell you to do

And also --verbose to see what it is doing before that error.


You can try deleting _site.


You can also try deleting your .png files from your local repo temporarily to see if one of those is causing your issue.

Also see this related Windows subsystem post which had suggested solution of move the repo to another directory.


You can also try

bundle add webbrick

And start a fresh project in another directory.

bundle exec jekyll new my-test

Then serve there.


Also delete your gems and do a fresh bundle install.