jekyll heroku部署问题

时间:2016-11-21 08:51:00

标签: heroku jekyll

我将一个jekyll网站部署到了heroku。日志表明应用程序状态已从“从头开始”更改(如下所示)。

Starting process with command `bundle exec puma -t 8:32 -w 3 -p 3641`
[4] Puma starting in cluster mode...
[4] * Version 3.6.0 (ruby 2.3.1-p112), codename: Sleepy Sunday Serenity
[4] * Min threads: 8, max threads: 32
[4] * Environment: production
[4] * Process workers: 3
[4] * Phased restart available
[4] * Listening on tcp://0.0.0.0:3641
[4] Use Ctrl-C to stop
Configuration file: /app/_config.yml
Configuration file: /app/_config.yml
Generating site: /app -> /app/_site
[4] - Worker 0 (pid: 6) booted, phase: 0
Generating site: /app -> /app/_site
[4] - Worker 2 (pid: 14) booted, phase: 0
Configuration file: /app/_config.yml
Generating site: /app -> /app/_site
[4] - Worker 1 (pid: 10) booted, phase: 0
heroku[web.1]: State changed from starting to up

但是当我点击我的网址时,它给了我“Jekyll目前正在渲染网站。 请稍后再试。“无论我等多久都说同样的事情。我多次重复部署,但它仍然给出相同的信息。

请指教。

1 个答案:

答案 0 :(得分:0)

我遇到了这个问题并通过添加资产来修复它:预编译rake任务到我的Rakefile。最初,我的Rakefile看起来像这样:

task :build do
  system('bundle exec jekyll build')
end

我自己的构建任务并没有挂钩到Heroku的构建过程,导致rack-jekyll无限地为其等待页面提供服务。 这是适用于我的Rakefile:

task :build do
  system('bundle exec jekyll build')
end

namespace :assets do
  task precompile: :build
end