0

我正在尝试使用通过 nanoc 编译的静态网站的 gitlab 页面。当我将代码提交到我的 gitlab 存储库时,运行器无法编译它。我收到以下错误消息:

跑步者输出:

Running with gitlab-ci-multi-runner 1.6.0 (01b3ea1)
Using Docker executor with image ruby:2.3 ...
Pulling docker image ruby:2.3 ...
Running on runner-......
Cloning repository...
Cloning into '/builds/username/testproject'...
Checking out a486d496 as master...
$ bundle install -j4
Fetching gem metadata from https://rubygems.org/...............
Fetching version metadata from https://rubygems.org/.
Resolving dependencies...
Installing colored 1.2
Installing concurrent-ruby 1.0.2
Installing tilt 2.0.5
Installing kramdown 1.12.0
Installing rack 2.0.1
Using bundler 1.13.1
Installing ref 2.0.0
Installing cri 2.7.0
Installing hamster 3.0.0
Installing haml 4.0.7
Installing adsf 1.2.1
Installing nanoc 4.3.3
Bundle complete! 4 Gemfile dependencies, 12 gems now installed.
Bundled gems are installed into /usr/local/bundle.
Post-install message from haml:

HEADS UP! Haml 4.0 has many improvements, but also has changes that may break
your application:

* Support for Ruby 1.8.6 dropped
* Support for Rails 2 dropped
* Sass filter now always outputs <style> tags
* Data attributes are now hyphenated, not underscored
* html2haml utility moved to the html2haml gem
* Textile and Maruku filters moved to the haml-contrib gem

For more info see:

http://rubydoc.info/github/haml/haml/file/CHANGELOG.md

$ nanoc
Loading site… 
Captain! We’ve been hit!

Message:

Errno::ENOENT: No such file or directory

Compilation stack:

(empty)

Stack trace:

  0. /usr/local/lib/ruby/2.3.0/find.rb:43:in `block in find'
  1. /usr/local/lib/ruby/2.3.0/find.rb:43:in `collect!'
  2. /usr/local/lib/ruby/2.3.0/find.rb:43:in `find'
  3. /usr/local/bundle/gems/nanoc-4.3.3/lib/nanoc/extra/pruner.rb:37:in `run'
  4. /usr/local/bundle/gems/nanoc-4.3.3/lib/nanoc/base/compilation/compiler.rb:186:in `prune'
  5. /usr/local/bundle/gems/nanoc-4.3.3/lib/nanoc/base/compilation/compiler.rb:77:in `run_all'
  6. /usr/local/bundle/gems/nanoc-4.3.3/lib/nanoc/base/entities/site.rb:30:in `compile'
  7. /usr/local/bundle/gems/nanoc-4.3.3/lib/nanoc/cli/commands/compile.rb:406:in `block in run'
  8. /usr/local/bundle/gems/nanoc-4.3.3/lib/nanoc/cli/commands/compile.rb:442:in `run_listeners_while'
  9. /usr/local/bundle/gems/nanoc-4.3.3/lib/nanoc/cli/commands/compile.rb:405:in `run'
  ... 17 more lines omitted. See full crash log for details.

If you believe this is a bug in Nanoc, please do report it at
-> https://github.com/nanoc/nanoc/issues/new <-

A detailed crash log has been written to ./crash.log.
done
Compiling site…
ERROR: Build failed: exit code 1

.gitlab-ci.yml

image: ruby:2.3

pages:
  script:
  - bundle install -j4
  - nanoc
  artifacts:
    paths:
    - public
  only:
  - master
4

1 回答 1

1

我的仓库中缺少公共目录。一旦我将此目录推送到远程,运行程序就可以编译和部署我的页面。

于 2016-09-28T22:27:45.110 回答