상세 컨텐츠

본문 제목

install jekyll on MacOS

programing/Jekyll blog

by ZelKun 2020. 7. 3. 00:09

본문

반응형

출처 :  https://jekyllrb-ko.github.io/

 

맥은 ruby, gem 이 이미 설치되있으니 (아니면 전에 깔아놨나..)

바로 jekyll, bundler 를 설치시작했다


homebrew 설치

혹시 homebrew 설치가 안되있다면 사전에 설치를 해야한다

 

문서에도 xcode를 설치하고, homebrew로 ruby를 설치하도록 되있다

예전에 ruby를 깔아놨었나???

[OS/MAC OS X] - [maxOS High Sierra]Homebrew 설치

xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install ruby   
echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.bash_profile

출처: https://jekyllrb-ko.github.io/docs/installation/macos/

한줄씩 실행하면된다


jekyll bundler설치

sudo gem install jekyll bundler

admin@admin ~ % ruby -v

ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]

admin@admin ~ % gem -v

3.0.3

admin@admin ~ % bundle -v

Bundler version 1.17.2

 

admin@admin ~ % sudo gem install jekyll bundler

Password:

Fetching em-websocket-0.5.1.gem

Fetching i18n-1.8.3.gem

Fetching addressable-2.7.0.gem

Fetching concurrent-ruby-1.1.6.gem

Fetching eventmachine-1.2.7.gem

Fetching http_parser.rb-0.6.0.gem

Fetching public_suffix-4.0.5.gem

Fetching colorator-1.1.0.gem

Fetching ffi-1.13.1.gem

Fetching sassc-2.4.0.gem

Fetching jekyll-sass-converter-2.1.0.gem

Fetching rb-fsevent-0.10.4.gem

Fetching rb-inotify-0.10.1.gem

Fetching listen-3.2.1.gem

Fetching jekyll-watch-2.2.1.gem

Fetching kramdown-2.2.1.gem

Fetching kramdown-parser-gfm-1.1.0.gem

Fetching liquid-4.0.3.gem

Fetching mercenary-0.4.0.gem

Fetching forwardable-extended-2.6.0.gem

Fetching pathutil-0.16.2.gem

Fetching rouge-3.20.0.gem

Fetching safe_yaml-1.0.5.gem

Fetching unicode-display_width-1.7.0.gem

Fetching terminal-table-1.8.0.gem

Fetching jekyll-4.1.1.gem

Successfully installed public_suffix-4.0.5

Successfully installed addressable-2.7.0

Successfully installed colorator-1.1.0

Building native extensions. This could take a while...

Successfully installed http_parser.rb-0.6.0

Building native extensions. This could take a while...

Successfully installed eventmachine-1.2.7

Successfully installed em-websocket-0.5.1

Successfully installed concurrent-ruby-1.1.6


 . . .

Parsing documentation for jekyll-4.1.1

Installing ri documentation for jekyll-4.1.1

Done installing documentation for public_suffix, addressable, colorator, http_parser.rb, eventmachine, em-websocket, concurrent-ruby, i18n, ffi, sassc, jekyll-sass-converter, rb-fsevent, rb-inotify, listen, jekyll-watch, kramdown, kramdown-parser-gfm, liquid, mercenary, forwardable-extended, pathutil, rouge, safe_yaml, unicode-display_width, terminal-table, jekyll after 54 seconds

Fetching bundler-2.1.4.gem

Successfully installed bundler-2.1.4

Parsing documentation for bundler-2.1.4

Installing ri documentation for bundler-2.1.4

Done installing documentation for bundler after 3 seconds

27 gems installed

 

설치


블로그 생성

jekyll new blog

admin@admin ~ % jekyll new blog 

Running bundle install in /Users/admin/blog... 

 

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: Fetching gem metadata from https://rubygems.org/..........

  Bundler: Fetching gem metadata from https://rubygems.org/.

  Bundler: Resolving dependencies...

  Bundler: Using public_suffix 4.0.5

  Bundler: Using addressable 2.7.0

  Bundler: Using bundler 2.1.4

  Bundler: Using colorator 1.1.0

  Bundler: Using concurrent-ruby 1.1.6

  Bundler: Using eventmachine 1.2.7

  Bundler: Using http_parser.rb 0.6.0

  Bundler: Using em-websocket 0.5.1

 

 . . .


  Bundler: Bundle complete! 6 Gemfile dependencies, 31 gems now installed.

  Bundler: Use `bundle info [gemname]` to see where a bundled gem is installed.The dependency tzinfo (~> 1.2) 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, x64-mingw32, x86-mswin32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java`.

  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, x64-mingw32, x86-mswin32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java`.

  Bundler: The dependency wdm (~> 0.1.1) 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, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`.

  Bundler: Following files may not be writable, so sudo is needed:

  Bundler: /Library/Ruby/Gems/2.6.0

  Bundler: /Library/Ruby/Gems/2.6.0/build_info

  Bundler: /Library/Ruby/Gems/2.6.0/cache

  Bundler: /Library/Ruby/Gems/2.6.0/doc

  Bundler: /Library/Ruby/Gems/2.6.0/extensions

  Bundler: /Library/Ruby/Gems/2.6.0/gems

  Bundler: /Library/Ruby/Gems/2.6.0/specifications

New jekyll site installed in /Users/admin/blog

admin@admin ~ % 

설치가 끝났다


디렉토리를 이동과 bundle update

cd blog

admin@admin ~ % cd blog

admin@admin blog % pwd

/Users/admin/blog

admin@admin blog % 

jekyll 문서 bundle update 를 자주하라고 하니 해주자


bundle update

admin@admin blog % bundle update

The dependency tzinfo (~> 1.2) 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, x64-mingw32, x86-mswin32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java`.

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, x64-mingw32, x86-mswin32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java`.

The dependency wdm (~> 0.1.1) 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, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`.

Fetching gem metadata from https://rubygems.org/..........

Fetching gem metadata from https://rubygems.org/.

Resolving dependencies...

Using public_suffix 4.0.5

Following files may not be writable, so sudo is needed:

  /Library/Ruby/Gems/2.6.0

  /Library/Ruby/Gems/2.6.0/build_info

  /Library/Ruby/Gems/2.6.0/cache

  /Library/Ruby/Gems/2.6.0/doc

  /Library/Ruby/Gems/2.6.0/extensions

  /Library/Ruby/Gems/2.6.0/gems

  /Library/Ruby/Gems/2.6.0/specifications

Using addressable 2.7.0

Using bundler 2.1.4

Using colorator 1.1.0

Using concurrent-ruby 1.1.6

Using eventmachine 1.2.7

Using http_parser.rb 0.6.0

Using em-websocket 0.5.1

Using ffi 1.13.1

Using forwardable-extended 2.6.0

Using i18n 1.8.3

Using sassc 2.4.0

Using jekyll-sass-converter 2.1.0

Using rb-fsevent 0.10.4

Using rb-inotify 0.10.1

Using listen 3.2.1

Using jekyll-watch 2.2.1

Using rexml 3.2.4

Using kramdown 2.2.1

Using kramdown-parser-gfm 1.1.0

Using liquid 4.0.3

Using mercenary 0.4.0

Using pathutil 0.16.2

Using rouge 3.20.0

Using safe_yaml 1.0.5

Using unicode-display_width 1.7.0

Using terminal-table 1.8.0

Using jekyll 4.1.1

Using jekyll-feed 0.14.0

Using jekyll-paginate 1.1.0

Using jekyll-seo-tag 2.6.1

Using minima 2.5.1

Bundle updated!

 


jekyll 서버 구동

bundle exec jekyll serve

admin@admin blog % bundle exec jekyll serve

Configuration file: /Users/admin/blog/_config.yml

            Source: /Users/admin/blog

       Destination: /Users/admin/blog/_site

 Incremental build: disabled. Enable with --incremental

      Generating... 

       Jekyll Feed: Generating feed for posts

                    done in 0.532 seconds.

 Auto-regeneration: enabled for '/Users/admin/blog'

    Server address: http://127.0.0.1:4000

  Server running... press ctrl-c to stop.

서버를 구동했으니 http://localhost:4000/ 으로 접속해보자


브라우저 테스트

 

install jekyll on MacOS

이 화면이 보인다면 성공

 

참고

https://jekyllrb-ko.github.io/docs/installation/macos/

 

관련글

[programing/Jekyll blog] - jekyll 외부접속 허용 포트변경

[programing/Jekyll blog] - install jekyll on Windows

[programing/Jekyll blog] - install jekyll on Raspbian or Ubuntu

반응형

관련글 더보기

댓글 영역