jirutka / rake-jekyll

Rake tasks for Jekyll as a gem.
MIT License
30 stars 3 forks source link

Fails if cache: bundler is enabled in Travis #11

Closed perlun closed 9 years ago

perlun commented 9 years ago

Hi,

When I added Bundle caching (which speeds up the builds quite a lot on Travis), I get this error:

$ bundle exec rake deploy
git clone 'git@github.com:perlun/halleluja.nu.git' .
Cloning into '.'...
remote: Counting objects: 613, done.
remote: Compressing objects: 100% (439/439), done.
remote: Total 613 (delta 113), reused 0 (delta 0), pack-reused 7
Receiving objects: 100% (613/613), 943.43 KiB | 0 bytes/s, done.
Resolving deltas: 100% (113/113), done.
Checking connectivity... done.
git checkout --track origin/gh-pages
Branch gh-pages set up to track remote branch gh-pages from origin.
Switched to a new branch 'gh-pages'
Running Jekyll...
bundle exec jekyll build --destination /tmp/d20151003-21309-bzbgko
Configuration file: /home/travis/build/perlun/halleluja.nu/_config.yml
            Source: /home/travis/build/perlun/halleluja.nu
       Destination: /tmp/d20151003-21309-bzbgko
      Generating... 
             ERROR: YOUR SITE COULD NOT BE BUILT:
                    ------------------------------------
                    Invalid date '0000-00-00': Post '/vendor/bundle/ruby/2.2.0/gems/jekyll-2.5.3/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb' does not have a valid date in the filename.
rake aborted!
Command failed with status (1): [bundle exec jekyll build --destination /tm...]
/home/travis/build/perlun/halleluja.nu/vendor/bundle/ruby/2.2.0/gems/rake-jekyll-1.1.0/lib/rake-jekyll/git_deploy_task.rb:196:in `block in <class:GitDeployTask>'
/home/travis/build/perlun/halleluja.nu/vendor/bundle/ruby/2.2.0/gems/rake-jekyll-1.1.0/lib/rake-jekyll/git_deploy_task.rb:302:in `call'
/home/travis/build/perlun/halleluja.nu/vendor/bundle/ruby/2.2.0/gems/rake-jekyll-1.1.0/lib/rake-jekyll/git_deploy_task.rb:302:in `block (2 levels) in define_task!'
/home/travis/build/perlun/halleluja.nu/vendor/bundle/ruby/2.2.0/gems/rake-jekyll-1.1.0/lib/rake-jekyll/git_deploy_task.rb:288:in `block in define_task!'
/home/travis/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
/home/travis/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => deploy
(See full trace by running task with --trace)

Any idea what we can do about it?

jirutka commented 9 years ago

Hi, I don't know, but it's certainly not caused by rake-jekyll. It looks like some problem in jekyll itself.

perlun commented 9 years ago

Thanks @jirutka - it turned out this is caused by the folder in which Travis installs stuff. This page explains that I need to exclude the vendor folder from Jekyll.

If you like, it might be an idea to add this to the rake-jekyll docs since it's quite likely that people will run into it. Nonetheless, closing the issue for now.