Written by
lsm
on
on
Local에서 github 블로그 실행
Local에서 github 블로그 실행
깃헙 블로그가 Jeklly로 되어 있습니다. 컴퓨터를 포맷하거나 바꾸게 되면 매번 환경 설정하는 거 찾기가 귀찮아 개인 기록용으로 남기는 글입니다.
Ruby 다운로드
gemspec 설정
gem install jekyll
gem install bundler
Local에서 블로그 실행
- 인코딩 에러 수정
chcp 65001
- 블로그 실행
jekyll serve
그런데 jekyll serve
를 실행 후 서버가 실행되지 않고 에러가 나오는 경우가 있다.
Traceback (most recent call last):
15: from C:/Ruby27-x64/bin/jekyll:23:in `<main>'
14: from C:/Ruby27-x64/bin/jekyll:23:in `load'
13: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/exe/jekyll:11:in `<top (required)>'
12: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/plugin_manager.rb:52:in `require_from_bundler'
11: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler.rb:149:in `setup'
10: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:20:in `setup'
9: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:101:in `block in definition_method'
8: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/definition.rb:226:in `requested_specs'
7: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/definition.rb:237:in `specs_for'
6: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/definition.rb:170:in `specs'
5: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/definition.rb:258:in `resolve'
4: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/resolver.rb:22:in `resolve'
3: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/resolver.rb:49:in `start'
2: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/resolver.rb:258:in `verify_gemfile_dependencies_are_found!'
1: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/resolver.rb:258:in `each'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/resolver.rb:290:in `block in verify_gemfile_dependencies_are_found!': Could not find gem 'rake (~> 12.3.3) x64-mingw32' in any of the gem sources listed in your Gemfile. (Bundler::GemNotFound)
이 때는 콘솔 창에 bundler
라고만 치면 해당 문제가 말끔히 사라집니다.
만약 프로젝트 파일에 Gemfile이 있는 경우 Gemfile을 삭제해주어야 합니다.