Forum How do I...?

Print from Jekyll

gbv34
Hello,
I'm currently working with a Jekyll template developed by Tom Johnson which should print a website with Prince.

First, I execute a shell script:
bundle exec jekyll serve --detach --config _config.yml,pdfconfigs/config_product1_pdf.yml;
echo "done";

echo "Building the PDF ...";
"C:\Program Files (x86)\Prince\engine\bin\prince.exe" --javascript --input-list=_site/pdfconfigs/prince-list.txt -o pdf/product1.pdf;
echo "done";


Then, I got an error message:
Failed to connect to localhost port 4000: Connection refused


I don't understand the problem.
When I start Jekyll, it functions smoothly in my browser with
bundle exec jekyll serve

and I access to it via
127.00.0.1:4000


Any idea of the problem?
Thanks a lot in advance for your help.
  1. config_product1_pdf.yml0.4 kB
    config file
  2. prince-list.txt3.3 kB
    prince list - template
adrianwong
Hi,

Unfortunately, I haven't been able to reproduce this.

Are you still able to access the site if you ran the full bundler command in isolation?
bundle exec jekyll serve --detach --config _config.yml,pdfconfigs/config_product1_pdf.yml
gbv34
Hi Adrian,
Thanks for your answer.

I've run the command above, and here is the result:
Auto-regeneration: disabled when running server detached.
    Server address: http://127.0.0.1:4011/product1-pdf/
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:301:in `fork': fork() function is unimplemented on this machine (NotImplementedError)


I got this fork() error because I'm using Windows.
However, I don't think it hinders Jekyll to work properly, given that the usual command
bundle exec jekyll serve
processes the contents and lets me access the website.
adrianwong
Hi gbv34,

Are you able to access the address specified by Jekyll (http://127.0.0.1:4011/product1-pdf/ in this case) after running the full bundler command?
gbv34
No, you're right, I can't. It seems to be a problem with Jekyll itself even though I just updated it to be sure it was ok.