내 컴퓨터에 Jekyll 설치해서 구동해보기 101

|

제목: 내 컴퓨터에 Jekyll 설치해서 구동해보기 101

local:/Users/eddiek/Documents  $ jekyll new eddiekwon.github.io

Could not load Bundler. Bundle install skipped.

New jekyll site installed in /Users/eddiek/Documents/eddiekwon.github.io.

위 처럼 Bundler어쩌고 나오면 이걸 먼저 설치해야 합니다.

혹시 이런 에러가 발생하면 참고하세요.

permission에러가 발생하면.


eddiek@ek.local:/Users/eddiek/Documents  $ gem install bundler
Fetching: bundler-1.16.5.gem (100%)
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.

sudo를 붙여서 설치합니다.

eddiek@ek.local:/Users/eddiek/Documents/eddiekwon.github.io  $ sudo gem install bundler
Password:
Fetching: bundler-1.16.5.gem (100%)
Successfully installed bundler-1.16.5
Parsing documentation for bundler-1.16.5
Installing ri documentation for bundler-1.16.5
Done installing documentation for bundler after 7 seconds
1 gem installed

이제 jekyll serve하면 되어야 하는데, 이미 에러가 발생한 상태를 고칠 순 없네요.

 $ jekyll serve
/Library/Ruby/Gems/2.3.0/gems/bundler-1.16.5/lib/bundler/resolver.rb:286:in `block in verify_gemfile_dependencies_are_found!': Could not find gem 'minima (~> 2.0)' in any of the gem sources listed in your Gemfile. (Bundler::GemNotFound)
	from /Library/Ruby/Gems/2.3.0/gems/bundler-1.16.5/lib/bundler/resolver.rb:254:in `each'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-1.16.5/lib/bundler/resolver.rb:254:in `verify_gemfile_dependencies_are_found!'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-1.16.5/lib/bundler/resolver.rb:48:in `start'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-1.16.5/lib/bundler/resolver.rb:22:in `resolve'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-1.16.5/lib/bundler/definition.rb:258:in `resolve'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-1.16.5/lib/bundler/definition.rb:171:in `specs'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-1.16.5/lib/bundler/definition.rb:238:in `specs_for'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-1.16.5/lib/bundler/definition.rb:227:in `requested_specs'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:108:in `block in definition_method'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:20:in `setup'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-1.16.5/lib/bundler.rb:107:in `setup'
	from /Library/Ruby/Gems/2.3.0/gems/jekyll-3.8.4/lib/jekyll/plugin_manager.rb:50:in `require_from_bundler'
	from /Library/Ruby/Gems/2.3.0/gems/jekyll-3.8.4/exe/jekyll:11:in `<top (required)>'
	from /usr/local/bin/jekyll:22:in `load'
	from /usr/local/bin/jekyll:22:in `<main>'

이전에 생성했던 폴더를 삭제하고 다시한번 jekyll new 해줍니다.

eddiek@ek.local:/Users/eddiek/Documents/eddiekwon.github.io  $ cd ..
eddiek@ek.local:/Users/eddiek/Documents  $ ls

삭제한 후 jekyll new해봅시다.

eddiek@ek.local:/Users/eddiek/Documents  $ rm -rf eddiekwon.github.io
eddiek@ek.local:/Users/eddiek/Documents  $ jekyll new eddiekwon.github.io
Running bundle install in /Users/eddiek/Documents/eddiekwon.github.io...


Your user account isn't allowed to install to the system RubyGems.
  You can cancel this installation and run:

      bundle install --path vendor/bundle

  to install the gems into ./vendor/bundle/, or you can enter your password
  and install the bundled gems to RubyGems using sudo.

  Password:
  Bundler: The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
  Bundler: Fetching gem metadata from https://rubygems.org/...........
  Bundler: Fetching gem metadata from https://rubygems.org/.
  Bundler: Resolving dependencies...
  Bundler: Using public_suffix 3.0.3
  Bundler: Using addressable 2.5.2
  Bundler: Using bundler 1.16.5
  Bundler: Using colorator 1.1.0
  Bundler: Using concurrent-ruby 1.0.5
  Bundler: Using eventmachine 1.2.7
  Bundler: Using http_parser.rb 0.6.0
  Bundler: Using em-websocket 0.5.1
  Bundler: Using ffi 1.9.25
  Bundler: Using forwardable-extended 2.6.0
  Bundler: Using i18n 0.9.5
  Bundler: Using rb-fsevent 0.10.3
  Bundler: Using rb-inotify 0.9.10
  Bundler: Using sass-listen 4.0.0
  Bundler: Using sass 3.6.0
  Bundler: Using jekyll-sass-converter 1.5.2
  Bundler: Using ruby_dep 1.5.0
  Bundler: Using listen 3.1.5
  Bundler: Using jekyll-watch 2.0.0
  Bundler: Using kramdown 1.17.0
  Bundler: Using liquid 4.0.0
  Bundler: Using mercenary 0.3.6
  Bundler: Using pathutil 0.16.1
  Bundler: Using rouge 3.3.0
  Bundler: Using safe_yaml 1.0.4
  Bundler: Using jekyll 3.8.4
  Bundler: Fetching jekyll-feed 0.11.0
  Bundler: Installing jekyll-feed 0.11.0
  Bundler: Fetching jekyll-seo-tag 2.5.0
  Bundler: Installing jekyll-seo-tag 2.5.0
  Bundler: Fetching minima 2.5.0
  Bundler: Installing minima 2.5.0
  Bundler: Bundle complete! 4 Gemfile dependencies, 29 gems now installed.
  Bundler: Use `bundle info [gemname]` to see where a bundled gem is installed.
New jekyll site installed in /Users/eddiek/Documents/eddiekwon.github.io.
 
eddiek@ek.local:/Users/eddiek/Documents  $ cd eddiekwon.github.io
eddiek@ek.local:/Users/eddiek/Documents/eddiekwon.github.io  $ jekyll se
fatal: 'jekyll se' could not be found. You may need to install the jekyll-se gem or a related gem to be able to use this subcommand.
eddiek@ek.local:/Users/eddiek/Documents/eddiekwon.github.io  $ jekyll serve
Configuration file: /Users/eddiek/Documents/eddiekwon.github.io/_config.yml
            Source: /Users/eddiek/Documents/eddiekwon.github.io
       Destination: /Users/eddiek/Documents/eddiekwon.github.io/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
       Jekyll Feed: Generating feed for posts
                    done in 0.63 seconds.
 Auto-regeneration: enabled for '/Users/eddiek/Documents/eddiekwon.github.io'
    Server address: http://127.0.0.1:4000/
  Server running... press ctrl-c to stop.
[2018-10-04 14:02:33] ERROR `/favicon.ico' not found.

Jekyll 설치까지 정말 힘들게 성공했네요.ㅜㅜ.

이제 페이지가 정상적으로 뜨는지 확인해보죠. 웹브라우져 실행 후 http://127.0.0.1:4000를 타이핑해봅시다

04B32C2C-5FB7-43F8-8563-91C6D80F7112

우와 잘 뜨네요. 1차 세팅은 성공했습니다. 기쁩니다 ^^.

Comments