Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build the HTML/PDF #30

Open
RodinGolodin opened this issue Jul 31, 2018 · 11 comments
Open

Unable to build the HTML/PDF #30

RodinGolodin opened this issue Jul 31, 2018 · 11 comments

Comments

@RodinGolodin
Copy link

I might not be the first one reporting this, but when I'm trying to build the book in PDF and HTML by running bundle exec liquidoc -c _configs/build-global.yml, the output is the following:

bundle exec liquidoc -c _configs/build-global.yml
ERROR: Could not validate input file: The config file (/Users/sergey.rodin/codewriting/_configs/build-global.yml) was not found.
bundler: failed to load command: liquidoc (/Users/sergey.rodin/.rbenv/versions/2.5.0/bin/liquidoc)
RuntimeError: InvalidInput
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/liquidoc-0.8.1/lib/liquidoc.rb:144:in `validate_file_input'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/liquidoc-0.8.1/lib/liquidoc.rb:71:in `config_build'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/liquidoc-0.8.1/lib/liquidoc.rb:1127:in `<top (required)>'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/liquidoc-0.8.1/bin/liquidoc:3:in `require'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/liquidoc-0.8.1/bin/liquidoc:3:in `<top (required)>'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/bin/liquidoc:23:in `load'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/bin/liquidoc:23:in `<top (required)>'

Then, since the _configs directory doesn't exist in the project, I instead point the command to the existing _config directory, like this: bundle exec liquidoc -c _config/build-global.yml. The output I'm getting is this:

INFO: Copied assets to _build.
INFO: File built: _build/pages/resume.adoc
INFO: Generating PDF. This can take some time...
INFO: Rendered file _build/assets/files/brian-dominick-resume.pdf.
INFO: File built: _build/assets/includes/item-lists.adoc
INFO: File built: _build/publish/assets/includes/item-lists.adoc
INFO: File built: _build/book-cw/backmatter/bibliography.adoc
INFO: File built: _build/book-cw/backmatter/glossary.adoc
INFO: File built: _build/pages/docops-glossary.adoc
INFO: Copied _data/glossary.yml to _build/book-cw/_data.
INFO: Copied README.adoc to _build.
INFO: Copied LICENSE.md to _build.
WARN: Problem while copying assets. File exists @ dir_s_mkdir - _build/book-cw/_data
bundler: failed to load command: liquidoc (/Users/sergey.rodin/.rbenv/versions/2.5.0/bin/liquidoc)
Errno::EEXIST: File exists @ dir_s_mkdir - _build/book-cw/_data
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/2.5.0/fileutils.rb:1265:in `mkdir'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/2.5.0/fileutils.rb:1265:in `copy'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/2.5.0/fileutils.rb:418:in `block in copy_entry'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/2.5.0/fileutils.rb:1390:in `wrap_traverse'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/2.5.0/fileutils.rb:1393:in `block in wrap_traverse'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/2.5.0/fileutils.rb:1392:in `each'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/2.5.0/fileutils.rb:1392:in `wrap_traverse'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/2.5.0/fileutils.rb:415:in `copy_entry'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/2.5.0/fileutils.rb:393:in `block in cp_r'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/2.5.0/fileutils.rb:1463:in `block in fu_each_src_dest'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/2.5.0/fileutils.rb:1477:in `fu_each_src_dest0'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/2.5.0/fileutils.rb:1461:in `fu_each_src_dest'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/2.5.0/fileutils.rb:392:in `cp_r'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/liquidoc-0.8.1/lib/liquidoc.rb:745:in `copy_assets'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/liquidoc-0.8.1/lib/liquidoc.rb:109:in `block in iterate_build'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/liquidoc-0.8.1/lib/liquidoc.rb:88:in `each'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/liquidoc-0.8.1/lib/liquidoc.rb:88:in `iterate_build'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/liquidoc-0.8.1/lib/liquidoc.rb:83:in `config_build'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/liquidoc-0.8.1/lib/liquidoc.rb:1127:in `<top (required)>'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/liquidoc-0.8.1/bin/liquidoc:3:in `require'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/liquidoc-0.8.1/bin/liquidoc:3:in `<top (required)>'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/bin/liquidoc:23:in `load'
  /Users/sergey.rodin/.rbenv/versions/2.5.0/bin/liquidoc:23:in `<top (required)>'

My _build/publish/ folder only contains this: item-lists.adoc.

The bundler: failed to load command: liquidoc (/Users/sergey.rodin/.rbenv/versions/2.5.0/bin/liquidoc) error seen in both outputs is what I think eventually prevents me from successfully building the files, though I still think it's helpful if my issue is posted here. I'll look elsewhere for the ways to fix it, and go read the PDF from Github for now :)

@briandominick
Copy link
Owner

briandominick commented Jul 31, 2018

Thanks for the report, Sergey. I appreciate your patience and interest!

This looks like the same issue as #13, which I'm hoping is resolved by PR #29 -- if you get a chance to test that PR on your local, I'd be thrilled to get a +1.

And thanks for reminding me about the _config/s/ bug, as I call it in my head now that I've sat on a patch till I can confirm this...

Also: Can you let me know wha OS you're using?

@RodinGolodin
Copy link
Author

Hi, Brian! Thank you for a prompt reply.

I'm using macOS Mojave 10.14 Beta (18A336e), and now that you asked, I think I should have mentioned this in the report since a lot of things can go wrong (unexpected) when one is using beta software.

@briandominick
Copy link
Owner

The plot thickens. I have not been able to reproduce it on MacOS 10.13.4 but have produced it on Linux. This rearranged build config works on Netlify when the master version does not.

@plaindocs
Copy link

plaindocs commented Jul 31, 2018

I'm testing this out with ruby 2.3.6 because neither 2.4.1 and 2.5.0 work for me, on master or on #29 branch. (Linux)

Except building 2.3.6 (using is proving to be a pain due to ssl issues. :-(

@plaindocs
Copy link

plaindocs commented Jul 31, 2018

Maybe try it with 2.4.3 which is also available on Netlify? Doesn't work for me though.

@briandominick
Copy link
Owner

I am still unable to reproduce the error anywhere but Netflow, where reorganizing solved it. I tried 2.4.3 locally and it works fine. This is reeeeeeally troubling for me, since the whole point of going through all this trouble and using Ruby runtime is to NOT have problems like this between installations. Maybe I need to do some more research into distributing Ruby gems and expecting them to work consistently.

@plaindocs
Copy link

Distributable cross platform ruby gems won't help if the underlying filesytem logic is faulty. Not sure what is going on though.

@plaindocs
Copy link

Might be a differing permissions issue on osx/linux? I really don't know.

@briandominick
Copy link
Owner

briandominick commented Aug 1, 2018

There simply has to be an order that works. I found another that Netlify builds properly and updated PR #29. I'd love if you could pull and test one more time @plaindocs (and @RodinGolodin).

https://app.netlify.com/sites/codewriting-org/deploys/5b61c7edb13fb12ca5a78709

@plaindocs
Copy link

So, the branch in #29 works for me.

With the proviso that I had to manually delete the offending dir before running liquidoc.

Doing the same with master results in the same problem.

@briandominick
Copy link
Owner

Thanks for testing @plaindocs! The good news is Netlify's env seems to test this better than I can, so I'm going to use it for tests for LiquiDoc. I've been setting up a content repo that attempts to build actual projects so I can use it for testing the gem itself. I'll also write up instructions about configuring builds in proper order and testing them on a Linux platform at some point (obviously already core to my toolchain for CD).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants