Giter Site home page Giter Site logo

kindlegen's People

Contributors

dogatana avatar emiraydin avatar gabebw avatar i-give-up avatar lax avatar mojavelinux avatar slonopotamus avatar tdtds avatar teamon avatar waynn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kindlegen's Issues

ENOENT when running from jRuby on Windows7

Hi,

I am running the gem using jRuby and I get the following error.

Caused by: org.jruby.exceptions.RaiseException: (Errno::ENOENT) C:/asciidoctor-maven-examples/asciidoctor-epub-example/target/gems-provided/gems/kindlegen-3.0.3/bin/kindlegen -dont_append_so
urce -c0 -o spine.mobi C:/asciidoctor-maven-examples/asciidoctor-epub-example/target/generated-docs/spine-kf8.epub
    at org.jruby.RubyProcess.spawn (org/jruby/RubyProcess.java:1569)
    at org.jruby.RubyKernel.spawn (org/jruby/RubyKernel.java:1511)
    at RUBY.popen_run (uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jruby/open3_windows.rb:204)
    at RUBY.popen2e (uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jruby/open3_windows.rb:199)
    at RUBY.distill_epub_to_mobi (uri:classloader:/gems/asciidoctor-epub3-1.5.0.alpha.7/lib/asciidoctor-epub3/packager.rb:617)
    at RUBY.package (uri:classloader:/gems/asciidoctor-epub3-1.5.0.alpha.7/lib/asciidoctor-epub3/packager.rb:602)
    at RUBY.write (uri:classloader:/gems/asciidoctor-epub3-1.5.0.alpha.7/lib/asciidoctor-epub3/converter.rb:41)
    at RUBY.write (uri:classloader:/gems/asciidoctor-1.5.6.1/lib/asciidoctor/document.rb:1083)
    at RUBY.convert (uri:classloader:/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1507)
    at RUBY.block in convert_file (uri:classloader:/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1575)
    at org.jruby.RubyIO.open (org/jruby/RubyIO.java:1156)
    at RUBY.convert_file (uri:classloader:/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1575)
    at RUBY.convertFile (<script>:75)

However, a mobi file is created and I can open it using SumatraPDF. Does this mean the process completes?

bundle install error - gem kindlegen

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb 

make "DESTDIR=" clean
make: *** No hay ninguna regla para construir el objetivo «clean». Alto.

make "DESTDIR="
make: No se hace nada para «all».

make "DESTDIR=" install
curl http://s3.amazonaws.com/kindlegen/kindlegen_linux_2.6_i386_v2_9.tar.gz -o kindlegen_linux_2.6_i386_v2_9.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10.3M 100 10.3M 0 0 46248 0 0:03:53 0:03:53 --:--:-- 63571
tar zxf kindlegen_linux_2.6_i386_v2_9.tar.gz
cp /kindlegen kindlegen
cp: no se puede efectuar `stat' sobre «
/kindlegen»: No existe el archivo o el directorio
make: *** [kindlegen] Error 1

make install failed, exit code 2

Gem files will remain installed in /tmp/bundler20141113-23486-xwly1/kindlegen-2.9.3/gems/kindlegen-2.9.3 for inspection.
Results logged to /tmp/bundler20141113-23486-xwly1/kindlegen-2.9.3/extensions/x86_64-linux/2.1.0-static/kindlegen-2.9.3/gem_make.out

another log here

ruby 2.1.5 install failure: "cp: */kindlegen: No such file or directory"

I'm upgrading to 2.1.5 today and started getting this installation failure:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /Users/jordanandree/.rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20141113-57088-11390o1.rb extconf.rb

make "DESTDIR=" clean
make: *** No rule to make target `clean'.  Stop.

make "DESTDIR="
make: Nothing to be done for `all'.

make "DESTDIR=" install
curl http://s3.amazonaws.com/kindlegen/KindleGen_Mac_i386_v2_9.zip -o KindleGen_Mac_i386_v2_9.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10.0M  100 10.0M    0     0  1716k      0  0:00:06  0:00:06 --:--:-- 1897k
unzip KindleGen_Mac_i386_v2_9.zip
Archive:  KindleGen_Mac_i386_v2_9.zip
   creating: docs/
   creating: docs/chinese/
  inflating: docs/chinese/known issues.txt
  inflating: docs/chinese/Readme.txt
  inflating: docs/chinese/Release Notes.html
   creating: docs/dutch/
  inflating: docs/dutch/known issues.txt
  inflating: docs/dutch/Readme.txt
  inflating: docs/dutch/Release Notes.html
   creating: docs/english/
  inflating: docs/english/known issues.txt
  inflating: docs/english/Readme.txt
  inflating: docs/english/Release Notes.html
   creating: docs/french/
  inflating: docs/french/Lisez-moi.txt
  inflating: docs/french/Notes de version.html
  inflating: docs/french/problemes connus.txt
   creating: docs/german/
  inflating: docs/german/bekannte probleme.txt
  inflating: docs/german/Bittelesen.txt
  inflating: docs/german/Versionshinweis.html
   creating: docs/italian/
  inflating: docs/italian/Leggimi.txt
  inflating: docs/italian/Note di pubblicazione.html
  inflating: docs/italian/problemi noti.txt
   creating: docs/japanese/
  inflating: docs/japanese/known issues.txt
  inflating: docs/japanese/Readme.txt
  inflating: docs/japanese/Release Notes.html
   creating: docs/spanish/
  inflating: docs/spanish/Leerme.txt
  inflating: docs/spanish/Notas de la version.html
  inflating: docs/spanish/problemas conocidos.txt
  inflating: EULA.txt
  inflating: EULA_Chinese.txt
  inflating: EULA_Dutch.txt
  inflating: EULA_French.txt
  inflating: EULA_German.txt
  inflating: EULA_Italian.txt
  inflating: EULA_Japanese.txt
  inflating: EULA_Spanish.txt
  inflating: kindlegen
  inflating: KindleGen Legal Notices 2013-02-19 Mac.txt
  inflating: manual.html
cp */kindlegen kindlegen
cp: */kindlegen: No such file or directory
make: *** [kindlegen] Error 1

make install failed, exit code 2

Gem files will remain installed in /Users/jordanandree/.rvm/gems/ruby-2.1.5@global/gems/kindlegen-2.9.3 for inspection.
Results logged to /Users/jordanandree/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-13/2.1.0/kindlegen-2.9.3/gem_make.out
An error occurred while installing kindlegen (2.9.3), and Bundler cannot continue.
Make sure that `gem install kindlegen -v '2.9.3'` succeeds before bundling.

I'm also using ruby gems version 2.4.3 if that helps

kindlegen without internet connectivity

I'm rying to use kindlegen in an environment without internet connectivity. I have gems replicated in a local repository, but kindlegen isntallation fails because it is unable to download binaries from the amazon web site.

Is it posible in the current version?

If not, would it be possible to let the rake file build the download URL reading from an environment variable? This would let me copy the binary into an internal repository and then download from there.

If you think this is acceptable, I could contribute the change through a merge request.

Support for Ruby 1.9.3?

Hey folks,

What would it take to get this gem working for Ruby 1.9.3? That's the version currently supported under default Ubuntu ppas.

I'd be happy to tackle this myself, but I'm not sure what it is about this project that requires Ruby 2.0.0+.

Lack of integrity verification of downloaded external dependencies

Hey,

My name is Maciej Mensfeld and I run a research security project called WhiteSource Diffend.

I've noticed, that this library downloads some external resources and uses them. While it's a totally common pattern, what is lacking here is integrity verification.

You could verify the integrity of the downloaded file before using it by comparing the file hash to a hardcoded, expected file hash.

This is essentially what package managers do to verify the integrity of downloaded packages.

Doing this would prevent attack scenarios in which the zip files are manipulated.

Have a great day :)

ref: https://github.com/tdtds/kindlegen/blob/master/ext/Rakefile#L87

Error installing kindlegen from rubygems

I am getting the following error when trying to install kindlegen. Any ideas on what could be going wrong?

$ gem install kindlegen
Building native extensions.  This could take a while...
ERROR:  Error installing kindlegen:
    ERROR: Failed to build gem native extension.

        /Users/ramnathvaidyanathan/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb

make
make: Nothing to be done for `all'.

make install
curl http://s3.amazonaws.com/kindlegen/KindleGen_Mac_i386_v2_4.zip -o KindleGen_Mac_i386_v2_4.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 8150k  100 8150k    0     0   418k      0  0:00:19  0:00:19 --:--:--  434k
tar zxf KindleGen_Mac_i386_v2_4.zip
gzip: stdin has more than one entry--rest ignored
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Child returned status 2
tar: Error exit delayed from previous errors
make: *** [kindlegen] Error 2


Gem files will remain installed in /Users/ramnathvaidyanathan/.rvm/gems/ruby-1.9.2-p290/gems/kindlegen-2.4.0 for inspection.
Results logged to /Users/ramnathvaidyanathan/.rvm/gems/ruby-1.9.2-p290/gems/kindlegen-2.4.0/ext/kindlegen/gem_make.out

Add Windows CI

In #32, I discovered that kindlegen doesn't pass tests on Windows because of changes that happened more than a year ago. Instead of manual discovery, it would be much better if kindlegen ran its tests on Windows the same way it runs on Linux. Note however that currently language: ruby + os: windows is not supported on Travis, even tough their Windows nodes do have Ruby installed.

Fails to install on Windows

Way to reproduce:

  1. master branch
  2. Windows
  3. Run rake test

Expected: tests pass

Actual: cp kindlegen.exe ../bin step fails with Errno::ENOENT: No such file or directory @ rb_sysopen - kindlegen.exe

Analysis:

  1. Copying fails because there's no file to copy.
  2. Although file is present in zip file
  3. There are WARNING: skipped <file> as unsafe during unzipping
  4. These warnings come from rubyzip.
  5. rubyzip logic has changed to fix CVE-2018-1000544.

Additional info: this bug also affects kindlegen-3.0.3 and kindlegen-3.0.4 releases. I didn't try other versions.

Verbose output of rake test --trace:

rake test --trace
** Invoke test (first_time)
** Invoke build (first_time)
** Execute build
kindlegen 3.0.4 built to pkg/kindlegen-3.0.4.gem.
** Execute test
Loaded suite C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/rake_test_loader
Started
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
constructing an Installer object with a string is deprecated. Please use Gem::Installer.at (called from: C:/Users/Marat/Documents/kindlegen/test/tes
t_kindlegen.rb:12:in `new')
Building native extensions. This could take a while...
E
====================================================================================================================================================

      9:     kindlegen_lib_dir = nil
     10:     gem_version = File.read(File.join(KINDLEGEN_PROJECT_DIR, 'lib/kindlegen/version.rb')).match(/VERSION = ["'](.*?)["']/)[1]
     11:     gem_file = File.join(KINDLEGEN_PROJECT_DIR, 'pkg', %(kindlegen-#{gem_version}.gem))
  => 12:         result = Gem::Installer.at(gem_file).install rescue Gem::Installer.new(gem_file).install
     13:     begin
     14:       require 'kindlegen'
     15:     rescue ::LoadError
C:/Users/Marat/Documents/kindlegen/test/test_kindlegen.rb:12:in `test_gem_install'
C:/Users/Marat/Documents/kindlegen/test/test_kindlegen.rb:12:in `rescue in test_gem_install'
C:/tools/ruby26/lib/ruby/2.6.0/rubygems/installer.rb:320:in `install'
C:/tools/ruby26/lib/ruby/2.6.0/rubygems/installer.rb:830:in `build_extensions'
C:/tools/ruby26/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in `build_extensions'
C:/tools/ruby26/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in `each'
C:/tools/ruby26/lib/ruby/2.6.0/rubygems/ext/builder.rb:229:in `block in build_extensions'
C:/tools/ruby26/lib/ruby/2.6.0/rubygems/ext/builder.rb:181:in `build_extension'
C:/tools/ruby26/lib/ruby/2.6.0/rubygems/ext/builder.rb:181:in `synchronize'
C:/tools/ruby26/lib/ruby/2.6.0/rubygems/ext/builder.rb:185:in `block in build_extension'
C:/tools/ruby26/lib/ruby/2.6.0/rubygems/ext/rake_builder.rb:30:in `build'
C:/tools/ruby26/lib/ruby/2.6.0/rubygems/ext/builder.rb:99:in `run'
Error: test_gem_install(KindlegenTest):
  Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

      current directory: C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/kindlegen-3.0.4/ext
  C:/tools/ruby26/bin/ruby.exe -rrubygems C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/exe/rake RUBYARCHDIR\=C:/tools/ruby26/lib/ruby/gems/2
.6.0/extensions/x64-mingw32/2.6.0/kindlegen-3.0.4 RUBYLIBDIR\=C:/tools/ruby26/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/kindlegen-3.0.4
  mkdir ../bin
  cp kindlegen.exe ../bin
  rake aborted!
  Errno::ENOENT: No such file or directory @ rb_sysopen - kindlegen.exe

  Tasks: TOP => default => install
  (See full trace by running task with --trace)
  open(http://kindlegen.s3.amazonaws.com/kindlegen_win32_v2_9.zip)
  save to kindlegen_win32_v2_9.zip
  win-unzip kindlegen_win32_v2_9.zip
  WARNING: skipped EULA.txt as unsafe
  WARNING: skipped EULA_Chinese.txt as unsafe
  WARNING: skipped EULA_Dutch.txt as unsafe
  WARNING: skipped EULA_French.txt as unsafe
  WARNING: skipped EULA_German.txt as unsafe
  WARNING: skipped EULA_Italian.txt as unsafe
  WARNING: skipped EULA_Japanese.txt as unsafe
  WARNING: skipped EULA_Spanish.txt as unsafe
  WARNING: skipped kindlegen.exe as unsafe
  WARNING: skipped KindleGen Legal Notices 2013-02-19 Windows.txt as unsafe
  WARNING: skipped manual.html as unsafe
  WARNING: skipped docs/german/bekannte probleme.txt as unsafe
  WARNING: skipped docs/german/Versionshinweis.html as unsafe
  WARNING: skipped docs/german/Bittelesen.txt as unsafe
  WARNING: skipped docs/spanish/problemas conocidos.txt as unsafe
  WARNING: skipped docs/spanish/Notas de la version.html as unsafe
  WARNING: skipped docs/spanish/Leerme.txt as unsafe
  WARNING: skipped docs/chinese/Readme.txt as unsafe
  WARNING: skipped docs/chinese/known issues.txt as unsafe
  WARNING: skipped docs/chinese/Release Notes.html as unsafe
  WARNING: skipped docs/italian/problemi noti.txt as unsafe
  WARNING: skipped docs/italian/Note di pubblicazione.html as unsafe
  WARNING: skipped docs/italian/Leggimi.txt as unsafe
  WARNING: skipped docs/dutch/Readme.txt as unsafe
  WARNING: skipped docs/dutch/known issues.txt as unsafe
  WARNING: skipped docs/dutch/Release Notes.html as unsafe
  WARNING: skipped docs/japanese/Readme.txt as unsafe
  WARNING: skipped docs/japanese/known issues.txt as unsafe
  WARNING: skipped docs/japanese/Release Notes.html as unsafe
  WARNING: skipped docs/english/Readme.txt as unsafe
  WARNING: skipped docs/english/known issues.txt as unsafe
  WARNING: skipped docs/english/Release Notes.html as unsafe
  WARNING: skipped docs/french/Lisez-moi.txt as unsafe
  WARNING: skipped docs/french/Notes de version.html as unsafe
  WARNING: skipped docs/french/problemes connus.txt as unsafe

  rake failed, exit code 1

  Gem files will remain installed in C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/kindlegen-3.0.4 for inspection.
  Results logged to C:/tools/ruby26/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/kindlegen-3.0.4/gem_make.out
====================================================================================================================================================


Finished in 8.4383249 seconds.
----------------------------------------------------------------------------------------------------------------------------------------------------

1 tests, 0 assertions, 0 failures, 1 errors, 0 pendings, 0 omissions, 0 notifications
0% passed
----------------------------------------------------------------------------------------------------------------------------------------------------

0.12 tests/s, 0.00 assertions/s
rake aborted!
Command failed with status (1): [ruby -w -I"lib;test" -I"C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib" "C:/tools/ruby26/lib/ruby/gems/2.
6.0/gems/rake-12.3.3/lib/rake/rake_test_loader.rb" "test/test_kindlegen.rb" ]
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/testtask.rb:130:in `block (3 levels) in define'
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/file_utils.rb:57:in `sh'
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/file_utils.rb:105:in `ruby'
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/testtask.rb:117:in `block (2 levels) in define'
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/file_utils_ext.rb:59:in `verbose'
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/testtask.rb:111:in `block in define'
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:273:in `block in execute'
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:273:in `each'
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:273:in `execute'
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:214:in `block in invoke_with_call_chain'
C:/tools/ruby26/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:194:in `invoke_with_call_chain'
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:183:in `invoke'
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:160:in `invoke_task'
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:116:in `block (2 levels) in top_level'
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:116:in `each'
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:116:in `block in top_level'
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:125:in `run_with_threads'
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:110:in `top_level'
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:83:in `block in run'
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:186:in `standard_exception_handling'
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:80:in `run'
C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
C:/tools/ruby26/bin/rake:23:in `load'
C:/tools/ruby26/bin/rake:23:in `<main>'
Tasks: TOP => test

Gem fails to install on MacOS

My environment is MacOS 10.15.7, using Ruby 2.7.3 in rbenv. Here's what I get from gem install kindlegen:

❯ gem install kindlegen                                                                                                                                                                   5 ↵
Building native extensions. This could take a while...
ERROR:  Error installing kindlegen:
        ERROR: Failed to build gem native extension.

    current directory: /Users/ben/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/kindlegen-3.1.1/ext
/Users/ben/.rbenv/versions/2.7.3/bin/ruby -I/Users/ben/.rbenv/versions/2.7.3/lib/ruby/2.7.0/rubygems -rrubygems /Users/ben/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/rake-13.0.3/exe/rake RUBYARCHDIR\=/Users/ben/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/extensions/x86_64-darwin-19/2.7.0/kindlegen-3.1.1 RUBYLIBDIR\=/Users/ben/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/extensions/x86_64-darwin-19/2.7.0/kindlegen-3.1.1
rake aborted!
Zlib::GzipFile::Error: not in gzip format

Tasks: TOP => default => install => kindlegen
(See full trace by running task with --trace)
open(https://web.archive.org/web/20200814013519/https://kindlegen.s3.amazonaws.com/KindleGen_Mac_i386_v2_9.zip)
save to KindleGen_Mac_i386_v2_9.zip

rake failed, exit code 1

Gem files will remain installed in /Users/ben/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/kindlegen-3.1.1 for inspection.
Results logged to /Users/ben/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/extensions/x86_64-darwin-19/2.7.0/kindlegen-3.1.1/gem_make.out

Add Windows support

Trying to use the gem on MS Windows currently fails with "Host OS unsupported".

I modified the extconf.rb accordingly:

  when /mingw32/i
    unzip = 'unzip'
     "kindlegen_win32_v2_9.zip"

Which works, but you still need to have the unzip and curl programs in your path.

Would be awesome if they could be replaced with ruby scripts / calls.

64-bit native kindlegen executable for Mac

See https://github.com/slonopotamus/kindlegen/runs/380905413#step:6:12

===============================================================================
Error: test_gem_install(KindlegenTest): Errno::E086: Bad CPU type in executable - /Users/runner/hostedtoolcache/Ruby/2.4.6/x64/lib/ruby/gems/2.4.0/gems/kindlegen-3.0.5/bin/kindlegen
/Users/runner/runners/2.163.1/work/kindlegen/kindlegen/test/test_kindlegen.rb:21:in ``'
/Users/runner/runners/2.163.1/work/kindlegen/kindlegen/test/test_kindlegen.rb:21:in `test_gem_install'
     18:       end
     19:       require 'kindlegen'
     20:     end
  => 21:     output = %x(#{Kindlegen.command})
     22:     assert output.include?('Amazon')
     23:   ensure
     24:     Gem::Uninstaller.new('kindlegen', :executables => true).uninstall rescue nil
===============================================================================

The problem is that modern MacOS (Catalina) doesn't support 32-bit binaries anymore. To make things worse, 64-bit kindlegen is not available on Amazon Kindlegen webpage.

Internets say people get 64-bit kindlegen from somewhere, however I failed to find any download link for it.

How to install "kindlegen"

I installed Kindle Comic Converter on macOS Sierra. It says "Cannot find KindleGen". Install it using Brew". I guess I installed the Brew by copying the command to Terminal but I got stuck on KindkeGen things. Please be humans and explain it step by step (or link me some tutorials maybe) how to do it to total noob :( Thanks a lot!

Failure installing gem with jruby

ERROR: Error installing kindlegen:
ERROR: Failed to build gem native extension.

    /Users/xxxx/torquebox-2.3.0/jruby/bin/jruby extconf.rb

NoMethodError: undefined method `expand' for RbConfig:Module
(root) at extconf.rb:25
open at org/jruby/RubyIO.java:1183
(root) at extconf.rb:6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.