user3753138
user3753138

Reputation: 119

Jekyll missing post, page, and default

My goal is to build a website using Jekyll + Github Pages. I've ran into trouble already where I had to upgrade my Mac from Mountain Lion to Mavericks just so I could install Xcode and RedCloth.

I'm trying to use Github Pages's official documentation, but it's been trouble as mentioned above. I'm at the point where I'm trying to run bundle exec jekyll serve

but I have received errors stating that there was no date like so:

ERROR: YOUR SITE COULD NOT BE BUILT:
                ------------------------------------
                Invalid date '0000-00-00': Post '/vendor/bundle/ruby/2.0.0/gems/jekyll-  2.4.0/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb' does not have a valid date in the filename.

So I went in and put in today's date. The next error was

 ERROR: YOUR SITE COULD NOT BE BUILT:
                ------------------------------------
                Invalid date '<%= Time.now.strftime('%Y-%m-%d %H:%M:%S') %>': Post '/vendor/bundle/ruby/2.0.0/gems/jekyll-2.4.0/lib/site_template/_posts/2014-10-08-welcome-to-jekyll.markdown.erb' does not have a valid date in the YAML front matter.

So I went into the welcome-to-jekyll file and put in today's date and time.

I tried to run the server again. The next issue which I now cannot get around is several files appear to be missing:

Build Warning: Layout 'post' requested in vendor/bundle/ruby/2.0.0/gems/jekyll-2.4.0/lib/site_template/_posts/2014-10-08-welcome-to-jekyll.markdown.erb does not exist.
 Build Warning: Layout 'page' requested in vendor/bundle/ruby/2.0.0/gems/jekyll-2.4.0/lib/site_template/about.md does not exist.
 Build Warning: Layout 'default' requested in vendor/bundle/ruby/2.0.0/gems/jekyll-2.4.0/lib/site_template/index.html does not exist.
Conversion error: Jekyll::Converters::Scss encountered an error converting 'vendor/bundle/ruby/2.0.0/gems/jekyll-2.4.0/lib/site_template/css/main.scss'.

Googling the issue has not brought any answers. From my understanding, this was supposed to be a straight forward process, but it's been a disaster the whole way!

Upvotes: 10

Views: 3132

Answers (3)

tread
tread

Reputation: 11098

Make sure the user who is running jekyll owns the Gemfile.lock

Upvotes: 0

LupineDev
LupineDev

Reputation: 1046

Did you by chance install your gems to vendor/bundle? I was getting the same error and this issue on the Jekyll github project fixed it for me https://github.com/jekyll/jekyll/issues/2938

Upvotes: 10

David Jacquel
David Jacquel

Reputation: 52809

It seems that you are not in the good place to work. You are working in the site template, used by Jekyll to generate new site. Don't touch this.

Instead, work in a new folder, eg: user/www/mysite

Once in this folder just do a jekyll new .

You can now do a jekyll serve or bundle exec jekyll serve it will work.

Upvotes: 2

Related Questions