2016-09-28 76 views
0

我正在嘗試使用通過nanoc編譯的靜態網站的gitlab頁面。當我將我的代碼提交給我的gitlab repo時,runner無法編譯它。我得到以下錯誤消息:Gitlab pages&nanoc - > Errno :: ENOENT:沒有這樣的文件或目錄

亞軍輸出:

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 

回答

1

公共目錄是在我的回購協議中失蹤。只要我把這個目錄推入遠程,跑步者就可以編譯和部署我的頁面。

相關問題