Fatal: The configuration file '_config.yml' could not be found


#1

Hi there,

I ran in into a strange issue which was already reported in 8th Aug 2016: [https://github.com/Phlow/feeling-responsive/issues/103]. But unfortunately there the issue has been closed without any hint.

My Jekyll (3.4.3) environment runs in a Docker container based on the image jekyll/jekyll. I use this image locally as well as in the pipeline of GitLab. In both environments all worked fine till today. Now the pipeline in GitLab doesn’t work anymore caused by the fatal error “The configuration file ‘_config.yml’ could not be found”. I hoped to see the reason by adding some additional commands but it doesn’t :unamused:. The strange thing is that the pipeline perfectly worked till yesterday and this with the same constellation. Here my Jekyll call:

bundle exec jekyll build -d public --config _config.yml,_config__gl.yml

I also used

bundle exec jekyll build -d public --config “_config.yml, _config__gl.yml”

Here an extraction of the log-output

. . .

Installing therubyracer 0.12.3 with native extensions
Bundle complete! 7 Gemfile dependencies, 28 gems now installed.
Use bundle show [gemname] to see where a bundled gem is installed.

$ ls -la /builds/bsv2017/bsv-website
-rw-rw-rw- 1 root root 269 Apr 28 17:29 Gemfile
-rw-rw-rw- 1 root root 1485 Apr 28 17:29 Gemfile.lock
-rw-rw-rw- 1 root root 1649 Apr 28 17:29 _config.yml
-rw-rw-rw- 1 root root 907 Apr 28 17:29 _config__dev.yml
-rw-rw-rw- 1 root root 138 Apr 28 17:29 _config__gl.yml
drwxrwxrwx 3 root root 4096 Apr 28 17:29 _data
$ bundle exec jekyll --version
jekyll 3.4.3
$ pwd
/builds/bsv2017/bsv-website
$ bundle exec jekyll build -d public --config "_config.yml, _config__gl.yml"
Fatal: The configuration file ‘_config.yml’ could not be found.
/usr/lib/ruby/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/configuration.rb:185:in rescue in read_config_file': The Configuration file '_config.yml' could not be found. (LoadError) from /usr/lib/ruby/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/configuration.rb:174:inread_config_file’
from /usr/lib/ruby/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/configuration.rb:201:in block in read_config_files' from /usr/lib/ruby/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/configuration.rb:199:ineach’

. . .

Does someone know what the problem is here?

Thanks
Udo


#2

I had something similar and fixed it by setting the working directory to /srv/jekyll.