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

cannot load such file -- kindlegen on Linux #268

Closed
abelsromero opened this issue Jan 26, 2020 · 15 comments
Closed

cannot load such file -- kindlegen on Linux #268

abelsromero opened this issue Jan 26, 2020 · 15 comments
Labels

Comments

@abelsromero
Copy link
Member

Following on asciidoctor/asciidoctor-maven-examples#77.
The issue still appears with alpha.11 building with maven and the gem, even on Linux.
For the gem build I am running asciidoctor -b epub3 -r asciidoctor-epub3 -a ebook-format=kf8 spine.adoc.

As another sad note, the workarround to call the maven build setting the envar KINDLEGEN=$(which kindlegen), does not work with alpha.11, it did with alpha.10.

Ruby environemnt
Already installe Ruby 2.6.4 (ruby 2.6.4p104 (2019-08-28 revision 67798) [x86_64-linux])
Gem installed

  • NOKOGIRI_USE_SYSTEM_LIBRARIES=1 gem install asciidoctor-epub3 --pre

Maven environement
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: ---/.sdkman/candidates/maven/current
Java version: 11.0.6, vendor: AdoptOpenJDK, runtime: ---/.sdkman/candidates/java/11.0.6.hs-adpt
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.4.13-3-manjaro", arch: "amd64", family: "unix"

@slonopotamus
Copy link
Contributor

slonopotamus commented Jan 26, 2020

Okay, there are two issues here:

  1. We do not have kindlegen gem when running through Maven plugin. I think this will be resolved with Move kindlegen out of optional deps #270, but need to check.
  2. I f*cked up environment variable name in alpha-11: 'KINDLEGEN' env var is not respected since #259 #269
  3. kindlegen gem is not installed when you do gem install asciidoctor-epub3 --pre: Move kindlegen out of optional deps #270
  4. Error message doesn't clearly explain how to solve this problem: resolves #268 provide a human-readable error message when we fail to find Kindlegen #271

@slonopotamus
Copy link
Contributor

Does it work if you manually install kindlegen gem?

slonopotamus added a commit to slonopotamus/asciidoctor-epub3 that referenced this issue Jan 26, 2020
@slonopotamus slonopotamus added this to the v1.5.0.alpha.12 milestone Jan 26, 2020
slonopotamus added a commit to slonopotamus/asciidoctor-epub3 that referenced this issue Jan 27, 2020
@slonopotamus
Copy link
Contributor

Too early to close this yet.

@slonopotamus slonopotamus reopened this Jan 27, 2020
@abelsalgadoromeroWD
Copy link

abelsalgadoromeroWD commented Jan 27, 2020

Does it work if you manually install kindlegen gem?

Do I need the gem? I have the kindlegen binary in my path.

@mojavelinux
Copy link
Member

No, you shouldn't. The gem just installs the binary. In the upcoming release, the converter will detect it on your PATH if you don't set the KINDLEGEN env var (and the gem is not installed and we decide to make it optional). The alternative is to set the KINDLEGEN env var to the location of the binary.

@slonopotamus
Copy link
Contributor

slonopotamus commented Jan 27, 2020

As I said, alpha-11 is unfortunately kinda broken WRT kindlegen path/env variable. I currently recommend either sticking to alpha-10 or installing kindlegen gem.

The alternative is to set the KINDLEGEN env var to the location of the binary.

I broke that in alpha-11 :( Already repaired it back on master, but still.

@abelsromero
Copy link
Member Author

I broke that in alpha-11 :( Already repaired back on master, but still.

haha 😆 shit happens to us all, don't be to hard on yourself. Moreover, it's alpha after all...

Just let me know when you think is ready to test, I can install the gem from master to test snapshots if necessary 👍

PS: applogies for the account crossing. Alwasy forget to switch accouts when I am with the work machine.

@slonopotamus
Copy link
Contributor

Okay, #276 was merged, I believe this bug can now be closed.

@abelsromero it would be great if you could test that master branch now works for you.

@abelsromero
Copy link
Member Author

Will do! thx. If not today, tomorrow afternoon I can come with news

@slonopotamus
Copy link
Contributor

@abelsromero okay, waiting for feedback from you. If everything's OK, I'll roll out alpha-12.

@abelsromero
Copy link
Member Author

abelsromero commented Feb 2, 2020

master branch working fine using Ruby in my Linux and Windows8.1 👍

Only issue was that on Windows nokogiri does not support Ruby 2.7 and had to install 2.6.

@slonopotamus
Copy link
Contributor

@abelsromero Thanks for your feedback!

Only issue was that on Windows nokogiri does not support Ruby 2.7 and had to install 2.6.

Yeah, we're waiting for sparklemotion/nokogiri#1961.

@abelsromero
Copy link
Member Author

Yeah, we're waiting for sparklemotion/nokogiri#1961.

Does this mean this fix is blocked untill next nokogiri version is released?

@slonopotamus
Copy link
Contributor

@abelsromero until that Nokogiri issue is fixed, we do not have Ruby-2.7 support on Windows. It doesn't block anything else.

To be more exact, the sequence is:

  1. Nokogiri makes new release with Ruby-2.7 support
  2. gepub upgrades to new Nokogiri (Update Nokogiri to 1.11.0 when ready  skoji/gepub#93) and makes a new release
  3. asciidoctor-epub3 upgrades to new gepub

@flavorjones
Copy link

Nokogiri release candidate v1.11.0.rc1 has been released with precompiled native libraries for Windows and Ruby 2.7. Please give it a whirl and let me know if you have any problems.

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

No branches or pull requests

5 participants