Post

깃 블로그 배포 오류

25일까지는 배포가 잘 되던게 26일에 배포하려고 깃허브에 업로드 하니 오류가 발생하였다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
##[debug]Evaluating condition for step: 'Setup Ruby'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Setup Ruby
##[debug]Loading inputs
##[debug]Loading env
Run ruby/setup-ruby@v1
##[debug]isExplicit: 3.3.0
##[debug]explicit? true
##[debug]checking cache: /opt/hostedtoolcache/Ruby/3.3.0/x64
##[debug]not found
::group::Modifying PATH
Modifying PATH
::group::Downloading Ruby
Downloading Ruby
::group::Extracting  Ruby
Extracting  Ruby
::group::Print Ruby version
Print Ruby version
::group::Installing Bundler
Installing Bundler
> bundle install
/opt/hostedtoolcache/Ruby/3.3.0/x64/bin/bundle config --local path /home/runner/work/hyemin12.github.io/hyemin12.github.io/vendor/bundle
/opt/hostedtoolcache/Ruby/3.3.0/x64/bin/bundle lock
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Writing lockfile to /home/runner/work/hyemin12.github.io/hyemin12.github.io/Gemfile.lock
Cache key: setup-ruby-bundler-cache-v6-ubuntu-22.04-x64-ruby-3.3.0-wd-/home/runner/work/hyemin12.github.io/hyemin12.github.io-with--without--only--Gemfile.lock-d71248164f4aeb41812e283a7636954ae41b4403697d97660cb72af4233bf099
##[debug]Resolved Keys:
##[debug]["setup-ruby-bundler-cache-v6-ubuntu-22.04-x64-ruby-3.3.0-wd-/home/runner/work/hyemin12.github.io/hyemin12.github.io-with--without--only--Gemfile.lock-d71248164f4aeb41812e283a7636954ae41b4403697d97660cb72af4233bf099","setup-ruby-bundler-cache-v6-ubuntu-22.04-x64-ruby-3.3.0-wd-/home/runner/work/hyemin12.github.io/hyemin12.github.io-with--without--only--Gemfile.lock-"]
##[debug]Checking zstd --quiet --version
##[debug]1.5.5
##[debug]zstd version: 1.5.5
##[debug]Resource Url: https://acghubeus1.actions.githubusercontent.com/8hkpl6p9sbxc78Q5P8PkYO2XG7hHXTUJwzdnJk0xKlON2qFB1X/_apis/artifactcache/cache?keys=setup-ruby-bundler-cache-v6-ubuntu-22.04-x64-ruby-3.3.0-wd-%2Fhome%2Frunner%2Fwork%2Fhyemin12.github.io%2Fhyemin12.github.io-with--without--only--Gemfile.lock-d71248164f4aeb41812e283a7636954ae41b4403697d97660cb72af4233bf099%2Csetup-ruby-bundler-cache-v6-ubuntu-22.04-x64-ruby-3.3.0-wd-%2Fhome%2Frunner%2Fwork%2Fhyemin12.github.io%2Fhyemin12.github.io-with--without--only--Gemfile.lock-&version=f3a190c975da8339aef2d723682c8fb06999ced0c1e8592447dabecbf40062e3
##[debug]Resource Url: https://acghubeus1.actions.githubusercontent.com/8hkpl6p9sbxc78Q5P8PkYO2XG7hHXTUJwzdnJk0xKlON2qFB1X/_apis/artifactcache/caches?key=setup-ruby-bundler-cache-v6-ubuntu-22.04-x64-ruby-3.3.0-wd-%2Fhome%2Frunner%2Fwork%2Fhyemin12.github.io%2Fhyemin12.github.io-with--without--only--Gemfile.lock-d71248164f4aeb41812e283a7636954ae41b4403697d97660cb72af4233bf099
##[debug]Failed to delete archive: Error: ENOENT: no such file or directory, unlink ''
/opt/hostedtoolcache/Ruby/3.3.0/x64/bin/bundle install --jobs 4
Fetching gem metadata from https://rubygems.org/.........
Fetching public_suffix 5.0.4
Fetching colorator 1.1.0
Fetching concurrent-ruby 1.2.2
Fetching eventmachine 1.2.7
Installing colorator 1.1.0
Installing public_suffix 5.0.4
Fetching http_parser.rb 0.8.0
Installing eventmachine 1.2.7 with native extensions
Installing concurrent-ruby 1.2.2
Fetching ffi 1.16.3
Installing http_parser.rb 0.8.0 with native extensions
Installing ffi 1.16.3 with native extensions
Fetching forwardable-extended 2.6.0
Installing forwardable-extended 2.6.0
Fetching google-protobuf 3.25.1
Installing google-protobuf 3.25.1 with native extensions
Fetching mercenary 0.4.0
Installing mercenary 0.4.0
Fetching mini_portile2 2.8.5
Installing mini_portile2 2.8.5
Fetching racc 1.7.3
Installing racc 1.7.3 with native extensions
Fetching parallel 1.24.0
Installing parallel 1.24.0
Fetching rainbow 3.1.1
Installing rainbow 3.1.1
Fetching yell 2.2.2
Installing yell 2.2.2
Fetching zeitwerk 2.6.12
Installing zeitwerk 2.6.12
Fetching rb-fsevent 0.11.2
Installing rb-fsevent 0.11.2
Fetching rexml 3.2.6
Installing rexml 3.2.6
Fetching liquid 4.0.4
Installing liquid 4.0.4
Fetching rouge 4.2.0
Installing rouge 4.2.0
Fetching safe_yaml 1.0.5
Installing safe_yaml 1.0.5
Fetching unicode-display_width 2.5.0
Installing unicode-display_width 2.5.0
Fetching webrick 1.8.1
Installing webrick 1.8.1
Fetching jekyll-paginate 1.1.0
Installing jekyll-paginate 1.1.0
Fetching addressable 2.8.6
Installing addressable 2.8.6
Fetching i18n 1.14.1
Installing i18n 1.14.1
Fetching pathutil 0.16.2
Installing pathutil 0.16.2
Fetching nokogiri 1.15.5
Installing nokogiri 1.15.5 with native extensions
Fetching kramdown 2.4.0
Installing kramdown 2.4.0
Fetching terminal-table 3.0.2
Installing terminal-table 3.0.2
Fetching ethon 0.16.0
Installing ethon 0.16.0
Fetching rb-inotify 0.10.1
Installing rb-inotify 0.10.1
Fetching kramdown-parser-gfm 1.1.0
Installing kramdown-parser-gfm 1.1.0
Fetching typhoeus 1.4.1
Installing typhoeus 1.4.1
Fetching listen 3.8.0
Installing listen 3.8.0
Fetching jekyll-watch 2.2.1
Installing jekyll-watch 2.2.1
Fetching em-websocket 0.5.3
Installing em-websocket 0.5.3
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/home/runner/work/hyemin12.github.io/hyemin12.github.io/vendor/bundle/ruby/3.3.0/gems/google-protobuf-3.25.1/ext/google/protobuf_c
rake
RUBYARCHDIR\=/home/runner/work/hyemin12.github.io/hyemin12.github.io/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/google-protobuf-3.25.1
RUBYLIBDIR\=/home/runner/work/hyemin12.github.io/hyemin12.github.io/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/google-protobuf-3.25.1
/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/3.3.0/rubygems.rb:259:in
`find_spec_for_exe': can't find gem rake (>= 0.a) with executable rake
(Gem::GemNotFoundException)
from /opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/3.3.0/rubygems.rb:278:in
`activate_bin_path'
	from /opt/hostedtoolcache/Ruby/3.3.0/x64/bin/rake:25:in `<main>'

rake failed, exit code 1

Gem files will remain installed in
/home/runner/work/hyemin12.github.io/hyemin12.github.io/vendor/bundle/ruby/3.3.0/gems/google-protobuf-3.25.1
for inspection.
Results logged to
/home/runner/work/hyemin12.github.io/hyemin12.github.io/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/google-protobuf-3.25.1/gem_make.out

/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:125:in
`run'
/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/3.3.0/rubygems/ext/rake_builder.rb:30:in
`build'
/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:193:in
`build_extension'
/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:227:in
`block in build_extensions'
/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:224:in
`each'
/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:224:in
`build_extensions'
/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/3.3.0/rubygems/installer.rb:852:in
`build_extensions'
/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/3.3.0/bundler/rubygems_gem_installer.rb:76:in
`build_extensions'
/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/3.3.0/bundler/rubygems_gem_installer.rb:28:in
`install'
/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/3.3.0/bundler/source/rubygems.rb:205:in
`install'
/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/3.3.0/bundler/installer/gem_installer.rb:54:in
`install'
/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/3.3.0/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/3.3.0/bundler/installer/parallel_installer.rb:132:in
`do_install'
/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/3.3.0/bundler/installer/parallel_installer.rb:123:in
`block in worker_pool'
/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/3.3.0/bundler/worker.rb:62:in
`apply_func'
/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/3.3.0/bundler/worker.rb:57:in
`block in process_queue'
  <internal:kernel>:187:in `loop'
/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/3.3.0/bundler/worker.rb:54:in
`process_queue'
/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/3.3.0/bundler/worker.rb:90:in
`block (2 levels) in create_threads'

An error occurred while installing google-protobuf (3.25.1), and Bundler cannot
continue.

In Gemfile:
  jekyll-theme-chirpy was resolved to 6.2.2, which depends on
    jekyll-archives was resolved to 2.2.1, which depends on
      jekyll was resolved to 4.3.2, which depends on
        jekyll-sass-converter was resolved to 3.0.0, which depends on
          sass-embedded was resolved to 1.69.5, which depends on
            google-protobuf
Error: The process '/opt/hostedtoolcache/Ruby/3.3.0/x64/bin/bundle' failed with exit code 5
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Setup Ruby

다음과 같은 오류가 발생하였고, 구글링을 해도 해결할 수 없어 chatGPT에 물어봤다.

1
Ruby 설정 과정에서 google-protobuf 젬을 설치하는 중에 문제가 발생한 것으로 보입니다. 오류 메시지에는 rake 젬을 찾을 수 없다는 문제가 나타나 있습니다

rake 젬을 찾을 수 없다하여 Gempfile에 해당 오류를 해결하기 위해 제시해준 코드를 추가하였지만 해결되지 않았다…

1
gem 'rake', '>= 0.a'

따라 ruby에 오류가 생긴 것 같아서 ruby를 삭제하고 재설치하였지만, 동일한 오류가 발생하였다.

chatGPT가 추천해주는 방법들을 모두 실행해봤지만 해결되지 않았고, 마지막으로 chatGPT가 로컬 환경에서 빌드해보는 것을 추천해줬다.

깃 블로그(ruby, jekyll)를 로컬 환경에서 실행시키기 위해 bundle install로 필요한 패키지들을 설치하였다.

로컬에서 빌드해보니, github actions을 실행했을 때와는 다른 오류가 발생하였다.

1
2
3
4
5
6
7
8
9
10
11
12
C:\Users\user\Desktop\JS-project\blog>bundle exec jekyll build --trace
Configuration file: C:/Users/user/Desktop/JS-project/blog/_config.yml
 Theme Config file: C:/Users/user/Desktop/JS-project/blog/_config.yml
            Source: C:/Users/user/Desktop/JS-project/blog
       Destination: C:/Users/user/Desktop/JS-project/blog/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
             Error: YAML Exception reading C:/Users/user/Desktop/JS-project/blog/_posts/오류/2022-11-07-fatalrefusingtomergeunrelatedhistories.md: (<unknown>): could not find expected ':' while scanning a simple key at line 3 column 1
             Error: YAML Exception reading C:/Users/user/Desktop/JS-project/blog/_posts/오류/2022-11-07-gitcommit오류.md: (<unknown>): could not find expected ':' while scanning a simple key at line 3 column 1

                    done in 393.006 seconds.
 Auto-regeneration: disabled. Use --watch to enable.

chatGPT에게 다시 물어보니, 해당 오류는 다음과 같았다.

1
Error: YAML Exception reading C:/Users/user/Desktop/JS-project/blog/_posts/오류/2022-11-07-fatalrefusingtomergeunrelatedhistories.md: (<unknown>): could not find expected ':' while scanning a simple key at line 3 column 1
1
2
빌드 중에 YAML 문서에서 오류가 발생하고 있습니다. YAML 문서는 콜론(:)을 기대하는데 해당 파일에서 콜론이 잘못 사용되었거나 누락된 것으로 보입니다.
이 오류 메시지에서 파일 경로와 함께 YAML 파싱 중에 오류가 발생한 위치가 표시되고 있습니다. 이 파일을 열어서 해당 위치에서 YAML 문법 오류를 찾아 수정해야 합니다.

혹시나 하고 2022-11-07에 작성했던 md를 확인하니,

1
2
3
4
---
title: Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'.
---

과 같이 작성되어 있었다. 아마 마크다운 파일을 긁어가면서 한 줄이 넘어가는데 ““으로 묶어주지 않아서 오류가 발생했던 것 같다. 이틀 동안 해결하지 못해서 이 방법 저 방법 다 해봤는데, 콜론을 안써서 생긴 오류였다니…

허.. 다른 포스트에도 ““를 붙였더니 이거대로 오류가 발생해서…

1
Error: YAML Exception reading C:/Users/user/Desktop/JS-project/blog/_posts/자바스크립트/2023-09-12-mapforeach차이.md: (<unknown>): mapping values are not allowed in this context at line 3 column 5

2022-11-07포스트 글을 한 줄로 변경했다…

rubyinstaller

This post is licensed under CC BY 4.0 by the author.