git blog 만들기 시작

dalonn98·2022년 8월 3일
0

Git-Blog

목록 보기
1/3

https://jekyllthemes.io/free
gitblog 테마 구경하다 심플한 포트폴리오 작성용으로 만들어보기로 했다.
https://github.com/jglovier/resume-template

순서는 단순한 것 같다.
To test locally, run the following in your terminal:

Clone repo locally
bundle install
bundle exec jekyll serve
Open your browser to localhost:4000

docker는 아직 서투르니 일단 local으로 설치해보려고 한다.
그전에 bundle install이 뭔지 찾아봤다.(처음봄)

what is bundle install
Install the dependencies specified in your Gemfile
젬파일에 있는 디펜던시를 먼저 설치해주는 과정인 듯 하다

루비를 설치해야하나 살펴보던 중
https://jekyllrb-ko.github.io/docs/installation/#requirements

지킬은 루비 2.4.0 이상이면 작동되고 맥에는 기본내장된 루비가 있어서(2.6.8) 루비는 따로 설치하지 않고 해보려고 한다.

# joni @ joniui-MacBookPro in ~/gitblog0803/resume-template-jglovier on git:gh-pages o [13:36:57]
$ ruby -v
ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.x86_64-darwin21]

# joni @ joniui-MacBookPro in ~/gitblog0803/resume-template-jglovier on git:gh-pages o [13:37:02]
$ bundler install
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.1.4) required by your /Users/joni/gitblog0803/resume-template-jglovier/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:2.1.4`
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
	from /usr/bin/bundler:23:in `<main>'

# joni @ joniui-MacBookPro in ~/gitblog0803/resume-template-jglovier on git:gh-pages o [13:40:49] C:1
$ bundle -v
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.1.4) required by your /Users/joni/gitblog0803/resume-template-jglovier/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:2.1.4`
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
	from /usr/bin/bundle:23:in `<main>'

# joni @ joniui-MacBookPro in ~/gitblog0803/resume-template-jglovier on git:gh-pages o [13:41:30] C:1
$ bundle update --bundler
You must use Bundler 2 or greater with this lockfile.

# joni @ joniui-MacBookPro in ~/gitblog0803/resume-template-jglovier on git:gh-pages o [13:41:39] C:20
$ gem install bundler:2.1.4
Fetching bundler-2.1.4.gem
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.

bundle 버전이 호환이 안되서 다른 버전을 설치해야 하고 그렇게하려면 ruby의 권한을 수정해줘야 하는 것 같은데 기본내장된 폴더권한을 수정하는 건 좀 그래서 rbenv를 설치하기로 했다..
참고블로그를 구글링해서 보다가 system ruby 권한 해결과 관련된 링크가 있어서 참고했다.

https://velog.io/@kkxxh/Mac%EC%97%90-Ruby-%EC%84%A4%EC%B9%98%ED%95%98%EA%B8%B0homebrew

$ gem install bundler
Fetching bundler-2.3.19.gem
Successfully installed bundler-2.3.19
Parsing documentation for bundler-2.3.19
Installing ri documentation for bundler-2.3.19
Done installing documentation for bundler after 1 seconds
1 gem installed

루비버전은 3.0.4로 설치했다.

와우 이제 될까 했는데..

$ bundle install
Fetching gem metadata from https://rubygems.org/.........
minitest-5.14.1 requires ruby version ~> 2.2, which is incompatible with the
current version, ruby 3.0.4p208

다시 구글링을 하다, bundle update를 하면 될까 싶어 한번 해봤다.
보통은 이렇게 한번에 업데이트하면 어디서 오류가 발생할지도 모르고 지양하지만 gemfile.lock을 보고 있으면 혼란스러워서 그냥 무작정..

bundle exec jekyll serve
Configuration file: /Users/joni/gitblog0803/resume-template-jglovier/_config.yml
            Source: /Users/joni/gitblog0803/resume-template-jglovier
       Destination: /Users/joni/gitblog0803/resume-template-jglovier/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
                    done in 0.118 seconds.
 Auto-regeneration: enabled for '/Users/joni/gitblog0803/resume-template-jglovier'
bundler: failed to load command: jekyll (/Users/joni/gitblog0803/resume-template-jglovier/_vendor/bundle/ruby/3.0.0/bin/jekyll)
/Users/joni/gitblog0803/resume-template-jglovier/_vendor/bundle/ruby/3.0.0/gems/jekyll-3.9.2/lib/jekyll/commands/serve/servlet.rb:3:in `require': cannot load such file -- webrick (LoadError)

엄청난 길이의 에러가 뜨긴 했는데 빨간 글씨가 신경쓰여서 또 한번 검색

jekyll 실행 시킬 때 require: cannot load such file -- webrick (LoadError) 오류가 난다면 bundle add webrick

$ bundle exec jekyll serve
Configuration file: /Users/joni/gitblog0803/resume-template-jglovier/_config.yml
            Source: /Users/joni/gitblog0803/resume-template-jglovier
       Destination: /Users/joni/gitblog0803/resume-template-jglovier/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
                    done in 0.091 seconds.
 Auto-regeneration: enabled for '/Users/joni/gitblog0803/resume-template-jglovier'
    Server address: http://127.0.0.1:4000
  Server running... press ctrl-c to stop.

와우!!!

profile
Cloud Engineer / interested in solutions architect & devops

0개의 댓글