Coder Social home page Coder Social logo

timmydo.github.io's People

Contributors

timmydo avatar

Watchers

James Cloos avatar  avatar

timmydo.github.io's Issues

I could not ran Jekyll with Docker on WSL on Windows 10

Hello @timmydo !

I own a laptop with Windows and a super-computer with Linux (also and Windows), but due to COVID-19 admonition and pandemic, I had to keep me myself distant from my bedroom to avoid contact with my grandparents and my sister and moved with the laptop to a "sanctuary bedroom".

On Windows 10, I installed natively Docker and enabled WSL experimental, selecting only Ubuntu. I open the project with VSCode Insiders and Remote-WSL: Ubuntu.

I followed your old article Blogging with VS Code, GitHub Pages and Jekyll. But it is outdated, then I checked your repository, which is updated. The problem is that your article is not clear or practical. I was confused. I will explain what I did.

Based on your Dockerfile, I used Ubuntu 20.04 instead because @envygeeks' package jekyll-assets requires Ruby 2.6 and later, and Jekyll 3.8 and up. And I had to run as a non-root user because Gem and Ruby warned me not to install packages via bundle as root.

  1. I installed natively Docker for Windows;
  2. I enabled the experimental WSL 2 based engine;
  3. I open the project with VSCode Insiders and Remote-WSL: Ubuntu;
  4. I ran the file docker.sh, which called Dockerfile at the root folder and not that .devcontainer folder.
  5. After entering into the container, I ran start.sh, I received an error:
                    ------------------------------------------------
      Jekyll 4.0.0   Please append `--trace` to the `serve` command 
                     for any additional information or backtrace. 
                    ------------------------------------------------
Traceback (most recent call last):
        47: from /usr/local/bin/bundle:23:in `<main>'
        46: from /usr/local/bin/bundle:23:in `load'
        45: from /var/lib/gems/2.7.0/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
        44: from /var/lib/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
        43: from /var/lib/gems/2.7.0/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
        42: from /var/lib/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
        41: from /var/lib/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
        40: from /var/lib/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
        39: from /var/lib/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
        38: from /var/lib/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
        37: from /var/lib/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
        36: from /var/lib/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
        35: from /var/lib/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
        34: from /var/lib/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
        33: from /var/lib/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
        32: from /usr/local/bin/jekyll:23:in `<top (required)>'
        31: from /usr/local/bin/jekyll:23:in `load'
        30: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/exe/jekyll:15:in `<top (required)>'
        29: from /var/lib/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
        28: from /var/lib/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
        27: from /var/lib/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
        26: from /var/lib/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
        25: from /var/lib/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
        24: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
        23: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `process_with_graceful_fail'
        22: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `each'
        21: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `block in process_with_graceful_fail'
        20: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:36:in `process'
        19: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:65:in `build'
        18: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:28:in `process_site'
        17: from /var/lib/gems/2.7.0/gems/jekyll-multiple-languages-plugin-1.6.1/lib/jekyll-multiple-languages-plugin.rb:116:in `process'
        16: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:77:in `process'
        15: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:211:in `cleanup'
        14: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/cleaner.rb:15:in `cleanup!'
        13: from /home/gusbemacbe/.bundle/ruby/2.7.0/jekyll-assets-47fc845853e2/lib/jekyll/assets/patches/obsolete.rb:22:in `obsolete_files'
        12: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/cleaner.rb:25:in `obsolete_files'
        11: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/cleaner.rb:59:in `new_files'
        10: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/cleaner.rb:59:in `tap'
         9: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/cleaner.rb:60:in `block in new_files'
         8: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:342:in `each_site_file'
         7: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:342:in `each'
         6: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:343:in `block in each_site_file'
         5: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:343:in `each'
         4: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:344:in `block (2 levels) in each_site_file'
         3: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/cleaner.rb:60:in `block (2 levels) in new_files'
         2: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/static_file.rb:58:in `destination'
         1: from /var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/url.rb:158:in `unescape_path'
/var/lib/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/url.rb:158:in `encode': "\\xC3" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)

I also tried @BretFisher's Docker image jekyll-serve, but it was unsuccessful, because this error:

docker run -p 8080:4000 -v $(pwd):/dicas-para-alunos-da-dankicode bretfisher/jekyll-serve
NOTE: hmm, I don't see a Gemfile so I don't think there's a jekyll site here
Either you didn't mount a volume, or you mounted it incorrectly.
Be sure you're in your jekyll site root and use something like this to launch

docker run -p 80:4000 -v $(pwd):/site bretfisher/jekyll-serve

NOTE: To create a new site, you can use the sister image bretfisher/jekyll like:

docker run -v $(pwd):/site bretfisher/jekyll new .

My repository is public and at GitLab, you can analyse the folder .devcontainer and the files _config.yml, docker-compose.debug.yml, docker-compose.yml, docker.sh, Dockerfile, Gemfile and start.sh. Here is the link: https://gitlab.com/gusbemacbe/dicas-para-alunos-da-dankicode

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.