ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • Jekyll 이용하여 GitHub Blog 로컬서버로 동작하기
    Game Development 2022. 3. 30. 03:55

    하라는 대로 하면 무지막지하게 많은 오류가 나면서 로컬 서버로 블로그 사이트가 들어가 지지 않는데

    그에 대한 오류 해결 정보가 너무 없다

     

    일단 오류 내용이 나오기 전 내가 했던 것들 ...

     

    0) Ruby 설치 => 가장 최신 버전 설치, 기본 버전 https://rubyinstaller.org/downloads/

    1) gem 파일을 받아서 설치 (이 자식도 홈페이지 가서 최신버전 받아놔야 함) https://rubygems.org/pages/download

    2) Start Command Prompt With Ruby ( 루비 설치 후 깔린 프로그램) 에서 ( !그냥 여기서 해야 오류 덜 함! )

    아래 명령어 사용하여 jekyll 설치

    gem install jekyll bundler

    => 결과 (정상적) . 위에 길게 설치 관련 내용이 더 있음 

     

    명령어 이용하여 jekyll 번들 설치

    3) jekyll 사이트 관련 파일들이 있는 블로그 폴더 생성하는 코드 실행 

     

    주의: 테마 적용을 하지 않은 버전의 사이트를 로컬 서버로 돌리는 방법 입니다.

    테마 적용을 했다면, 이 코드는 쓰지 말고 넘어가세요.

    jekyll new 블로그폴더이름

    => 결과 (정상적)

     

    4) 폴더로 이동

    cd 블로그폴더이름

     

    5) 로컬서버 구동하기

    bundle exec jekyll serve

     

    ---

     

    여기까지에서 뜨는 오류 심각하게 길다

    결과 (심각 오류)

    => 텍스트 버전에서 중요 부분만 뽑아오겠음

     

    Configuration file: C:/Users/c/MyGitBlog/_config.yml
                Source: C:/Users/c/MyGitBlog
           Destination: C:/Users/c/MyGitBlog/_site
     Incremental build: disabled. Enable with --incremental
          Generating...
           Jekyll Feed: Generating feed for posts
                        done in 0.3 seconds.
      Please add the following to your Gemfile to avoid polling for changes:
        gem 'wdm', '>= 0.1.0' if Gem.win_platform?
     Auto-regeneration: enabled for 'C:/Users/c/MyGitBlog'
                        ------------------------------------------------
          Jekyll 4.2.2   Please append `--trace` to the `serve` command
                         for any additional information or backtrace.
                        ------------------------------------------------

     

    문제 1 => 아래 실행으로 해결

    bundle exec jekyll serve --trace


    C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve/servlet.rb:3:in `require': cannot load such file -- webrick (LoadError)
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve/servlet.rb:3:in `<top (required)>'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:179:in `require_relative'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:179:in `setup'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:100:in `process'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `each'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/exe/jekyll:15:in `<top (required)>'
            from C:/Ruby31-x64/bin/jekyll:32:in `load'
            from C:/Ruby31-x64/bin/jekyll:32:in `<main>'

     

    => 해결 후 남은 문제 2
    C:\Users\c\MyGitBlog>bundle exec jekyll serve --trace (문제1 해결)
    Configuration file: C:/Users/c/MyGitBlog/_config.yml
                Source: C:/Users/c/MyGitBlog
           Destination: C:/Users/c/MyGitBlog/_site
     Incremental build: disabled. Enable with --incremental
          Generating...
           Jekyll Feed: Generating feed for posts
                        done in 1.0 seconds.
      Please add the following to your Gemfile to avoid polling for changes:
        gem 'wdm', '>= 0.1.0' if Gem.win_platform?
     Auto-regeneration: enabled for 'C:/Users/c/MyGitBlog'
    C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve/servlet.rb:3:in `require': cannot load such file -- webrick (LoadError)
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-

     

    => 문제2 해결

     bundle add webrick

     

    4.2.2/lib/jekyll/commands/serve/servlet.rb:3:in `<top (required)>'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:179:in `require_relative'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:179:in `setup'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:100:in `process'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `each'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
            from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/exe/jekyll:15:in `<top (required)>'
            from C:/Ruby31-x64/bin/jekyll:32:in `load'
            from C:/Ruby31-x64/bin/jekyll:32:in `<main>'


    ---

     

    로컬 서버 구동에 성공한 모습

     

     

    서버 구동 명령 시 정상 작동하는 반응, 종료하려면 컨트롤 + c

    이렇게 되고 localhost:4000 에 들어가면 만들었던 깃 블로그거 정상 작동한다

     

    정상 작동하는 jekyll 깃블로그

     

Designed by Tistory.