/Users/ユーザー名/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/narou-3.8.2/narou.rb:10:in `require_relative': cannot load such file -- /Users/ユーザー名/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/narou-3.8.2/lib/extension (LoadError)
from /Users/ユーザー名/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/narou-3.8.2/narou.rb:10:in `<top (required)>'
from /Users/ユーザー名/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/narou-3.8.2/bin/narou:13:in `require_relative'
from /Users/ユーザー名/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/narou-3.8.2/bin/narou:13:in `<top (required)>'
from /Users/ユーザー名/.rbenv/versions/3.3.0/bin/narou:25:in `load'
from /Users/ユーザー名/.rbenv/versions/3.3.0/bin/narou:25:in `<main>'
gem which narou をためすと、
ERROR: Can't find Ruby library file or shared library narou
と出ます。
以下、gem install narou
をした時のエラー表示
_______
c:\>gem install narou
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing narou:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sassc-2.4.0/ext
C:/Ruby32-x64/bin/ruby.exe extconf.rb
creating Makefile
current directory: C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sassc-2.4.0/ext
make DESTDIR\= sitearchdir\=./.gem.20240406-8836-13mkuh sitelibdir\=./.gem.20240406-8836-13mkuh clean
current directory: C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sassc-2.4.0/ext
make DESTDIR\= sitearchdir\=./.gem.20240406-8836-13mkuh sitelibdir\=./.gem.20240406-8836-13mkuh
compiling ./libsass/src/ast.cpp
make: g++: コマンドが見つかりませんでした
make: *** [Makefile:240: ast.o] エラー 127
make failed, exit code 2
Gem files will remain installed in C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sassc-2.4.0 for inspection.
Results logged to C:/Ruby32-x64/lib/ruby/gems/3.2.0/extensions/x64-mingw-ucrt/3.2.0/sassc-2.4.0/gem_make.out
Narou.rb のバージョン:
Version 3.9.0
OS のバージョン:Windows11
何が起きたのか:
再現方法(何をやったら起こったのか詳細に):
小説家になろうからのダウンロードの際、100話前後の作品は問題無くテキストとEPUBが生成されるのですが、300話など長い作品の場合、テキストは生成されるものの、EPUB生成に失敗してしまいます。エラーメッセージを添付します。
--------
変換開始 : D:\narounovel\小説データ\小説家になろう\n7259z 双色の錬金術師\[ちゅるぎ] 双色の錬金術師.txt
[INFO] 濁点フォント利用 (17741) : ん゛
[INFO] 濁点フォント利用 (65560) : あ゛
[INFO] 濁点フォント利用 (65560) : ぁ゛
[INFO] 濁点フォント利用 (65560) : ぃ゛
[INFO] 濁点フォント利用 (76855) : あ゛
[INFO] 濁点フォント利用 (79905) : あ゛
java.io.IOException: This archives contains unclosed entries.
at org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.finish(ZipArchiveOutputStream.java:343)
at org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.close(ZipArchiveOutputStream.java:550)
at com.github.hmdev.writer.Epub3Writer.write(Epub3Writer.java:968)
at AozoraEpub3.convertFile(AozoraEpub3.java:512)
at AozoraEpub3.main(AozoraEpub3.java:431)
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/image/codec/jpeg/ImageFormatException
at com.sun.media.jai.codecimpl.JPEGImageDecoder.decodeAsRenderedImage(JPEGImageDecoder.java:46)
at com.sun.media.jai.codec.ImageDecoderImpl.decodeAsRenderedImage(ImageDecoderImpl.java:140)
at com.github.hmdev.image.ImageUtils.readImage(ImageUtils.java:107)
at com.github.hmdev.image.ImageUtils.writeImage(ImageUtils.java:152)
at com.github.hmdev.writer.Epub3Writer.writeImage(Epub3Writer.java:1032)
at com.github.hmdev.writer.Epub3Writer.write(Epub3Writer.java:909)
at AozoraEpub3.convertFile(AozoraEpub3.java:512)
at AozoraEpub3.main(AozoraEpub3.java:431)
Caused by: java.lang.ClassNotFoundException: com.sun.image.codec.jpeg.ImageFormatException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
... 8 more
pid 29992 exit 1
[ERROR] JavaがインストールされていないかAozoraEpub3実行時にエラーが発生しました。EPUBを作成出来ませんでした
いつも使わせていただいております
すみませんが教えてください
Web UIの方を利用してなろう小説をダウンロードしていたのですが、何個目からか
「[ERROR] 何らかの理由により目次が取得できませんでした(403 Forbidden)」
と赤で出てダウンロードできなくなりました
その後画面がフリーズしてしまったので一旦終了させてからの再起動でWebUIを立ち上げようとしたら立ち上がらなくなってしまいました
cmdにnarou webと入力しても出てこない
narou d (タイトル)を打っても、どちらも下の文章が出てきて、その後497:inとかrb:45:inとかいう文章がずらずらと出てきて最初のC:の入力前cmdに戻ってしまいます
C:/Ruby31-x64/lib/luby/3.1.0/psych.rb:455:in parse:(C:/MyNovel/.narou/database.yaml):control characters are not allowed at line 1 column1(Psych:SyntaxError)
こちらのnarou.rbを使うためだけに残してあるようなパソコンなので(古くてごめんなさい)
Ruby 3.1.0-1-x64-urct with MSYS2
Java 8 Update321(64-bit)
AozoraEpuv3-1.1.0b46
narou はコマンド打ったら昨日と同じ状態になりわかりませんでした
C:/Ruby31-x64/lib/luby/3.1.0/psych.rb:455:in parse:(C:/MyNovel/.narou/database.yaml):control characters are not allowed at line 1 column1(Psych:SyntaxError)
新規インストールは無事出来ました
web UIも出ますしnarou versionなどnarouのコマンド関係は問題無く動くようになりました
たのでですが、今度はAozoraEpub3に問題があるらしくエラーが出てしまいます
narou d 小説 でダウンロード開始
縦書き用の変換が終了しました
AozoraEpuv3でEPUBに変換しています....
[ERRER]file not exist.C:\MyNovel|\(ここから文字化け)
[ERROR]AozoraEpub3実行中にエラーが発生したため、EPUBが出力出来ませんでした
以下のエラーを吐いてしまいメール設定が完了できません
535-5.7.8 Username and Password not accepted. For more information, go to
fromにはAmazonで認証済みのgmailアドレスを、toにはKindleに設定したアドレスを入力しています
Cでいうところの構造体メンバであるuser_nameにはメールアドレスを、パスワードにはそのGoogleアカウントのパスを入力しました
最後の項目もtureに書き換えています
どこに不備があるのか見当がつきません
ご助力願えればと思います
#<Thread:0x00000220f97cd758 C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/narou-3.9.0/lib/web/web_worker.rb:46 run> terminated with exception (report_on_exception is true):
C:/tools/ruby33/lib/ruby/3.3.0/pathname.rb:422:in `initialize': no implicit conversion of nil into String (TypeError)
arg = Pathname.new(arg) unless Pathname === arg
^^^
from C:/tools/ruby33/lib/ruby/3.3.0/pathname.rb:422:in `new'
from C:/tools/ruby33/lib/ruby/3.3.0/pathname.rb:422:in `block in join'
from C:/tools/ruby33/lib/ruby/3.3.0/pathname.rb:421:in `reverse_each'
from C:/tools/ruby33/lib/ruby/3.3.0/pathname.rb:421:in `join'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/narou-3.9.0/lib/downloader.rb:1276:in `get_novel_data_dir'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/memoist-0.11.0/lib/memoist.rb:130:in `get_novel_data_dir'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/narou-3.9.0/lib/downloader.rb:1318:in `init_novel_dir'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/narou-3.9.0/lib/downloader.rb:364:in `run_download'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/narou-3.9.0/lib/downloader.rb:334:in `start_download'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/narou-3.9.0/lib/command/download.rb:142:in `block in execute'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/narou-3.9.0/lib/command/download.rb:110:in `each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/narou-3.9.0/lib/command/download.rb:110:in `with_index'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/narou-3.9.0/lib/command/download.rb:110:in `execute'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/narou-3.9.0/lib/commandbase.rb:125:in `execute!'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/narou-3.9.0/lib/commandbase.rb:134:in `execute!'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/narou-3.9.0/lib/commandline.rb:29:in `run'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/narou-3.9.0/lib/commandline.rb:43:in `run!'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/narou-3.9.0/lib/web/appserver.rb:539:in `block (2 levels) in <class:AppServer>'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/narou-3.9.0/lib/web/web_worker.rb:47:in `block (3 levels) in start'
[2024-09-20 17:31:46] ERROR TypeError: no implicit conversion of nil into String\n\tC:/tools/ruby33/lib/ruby/3.3.0/pathname.rb:422:in `new'
ID:581 【連載版】俺だけステータスオープンできる件〜はずれスキル【開】のせいで実家を追放されたが、ステータス確認できる俺はチートスキルもS級アイテムも選び放題で気づけば世界最強。俺を虐げた皆ねえ今どんな気分? のDL開始
第20部分 20.勇者へと進化、教団の陰謀を阻止する (1/1)
ID:581 【連載版】俺だけステータスオープンできる件〜はずれスキル【開】のせいで実家を追放されたが、ステータス確認できる俺はチートスキルもS級アイテムも選び放題で気づけば世界最強。俺を虐げた皆ねえ今どんな気分? の変換を開始
縦書用の変換が終了しました
AozoraEpub3でEPUBに変換しています..
--------
変換開始 : D:\__kindle_narou\小説データ\小説家になろう\n9203ii 【連載版】俺だけステータスオープンできる件〜はずれスキル【開】のせいで実家を追放され\[茨木野] 【連載版】俺だけステータスオープンできる件〜はずれスキル【開】のせいで実家を追放されたが、ステータス確認でき.txt
java.io.IOException: This archives contains unclosed entries.
at org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.finish(ZipArchiveOutputStream.java:343)
at org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.close(ZipArchiveOutputStream.java:550)
at com.github.hmdev.writer.Epub3Writer.write(Epub3Writer.java:968)
at AozoraEpub3.convertFile(AozoraEpub3.java:512)
at AozoraEpub3.main(AozoraEpub3.java:431)
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/image/codec/jpeg/ImageFormatException
at com.sun.media.jai.codecimpl.JPEGImageDecoder.decodeAsRenderedImage(JPEGImageDecoder.java:46)
at com.sun.media.jai.codec.ImageDecoderImpl.decodeAsRenderedImage(ImageDecoderImpl.java:140)
at com.github.hmdev.image.ImageUtils.readImage(ImageUtils.java:107)
at com.github.hmdev.image.ImageUtils.writeImage(ImageUtils.java:152)
at com.github.hmdev.writer.Epub3Writer.writeImage(Epub3Writer.java:1032)
at com.github.hmdev.writer.Epub3Writer.write(Epub3Writer.java:909)
at AozoraEpub3.convertFile(AozoraEpub3.java:512)
at AozoraEpub3.main(AozoraEpub3.java:431)
Caused by: java.lang.ClassNotFoundException: com.sun.image.codec.jpeg.ImageFormatException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
... 8 more
pid 3288 exit 1
[ERROR] JavaがインストールされていないかAozoraEpub3実行時にエラーが発生しました。EPUBを作成出来ませんでした
narou web を実行ししても、以下のメッセージが出て、WEB UIが立ち上がりません
E:\txt\MyNovel>narou web
<internal:C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require': cannot load such file -- tilt/erubis (LoadError)
from <internal:C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/narou-3.9.1/lib/web/appserver.rb:15:in `<top (required)>'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/narou-3.9.1/lib/web/all.rb:7:in `require_relative'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/narou-3.9.1/lib/web/all.rb:7:in `<top (required)>'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/narou-3.9.1/lib/command/web.rb:118:in `require_relative'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/narou-3.9.1/lib/command/web.rb:118:in `boot'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/narou-3.9.1/lib/command/web.rb:87:in `execute'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/narou-3.9.1/lib/commandbase.rb:125:in `execute!'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/narou-3.9.1/lib/commandbase.rb:134:in `execute!'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/narou-3.9.1/lib/commandline.rb:29:in `run'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/narou-3.9.1/lib/commandline.rb:43:in `run!'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/narou-3.9.1/narou.rb:50:in `block in <top (required)>'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/narou-3.9.1/lib/backtracer.rb:16:in `capture'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/narou-3.9.1/narou.rb:49:in `<top (required)>'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/narou-3.9.1/bin/narou:13:in `require_relative'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/narou-3.9.1/bin/narou:13:in `<top (required)>'
from C:/Ruby33-x64/bin/narou:32:in `load'
from C:/Ruby33-x64/bin/narou:32:in `<main>'
You have requested to uninstall the gem:
tilt-2.6.0
haml-5.2.2 depends on tilt (>= 0)
narou-3.9.1 depends on tilt (~> 2.0, >= 2.0.10)
sinatra-2.2.4 depends on tilt (~> 2.0)
sinatra-contrib-2.2.4 depends on tilt (~> 2.0)
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN] y
Remove executables:
tilt
in addition to the gem? [Yn] n
Executables and scripts will remain installed.
Successfully uninstalled tilt-2.6.0
3. tilt 2.4.0のみのインストール
c:\narou2>gem install tilt -v 2.4.0
Using rubygems directory: C:/Users/karl0/.local/share/gem/ruby/3.4.0
Successfully installed tilt-2.4.0
1 gem installed
c:\narou2>gem list tilt
tilt (2.4.0)
使用したJaveとRubyは下記のバージョンです。
c:\narou2>java -version
openjdk version "21.0.7" 2025-04-15 LTS
OpenJDK Runtime Environment Temurin-21.0.7+6 (build 21.0.7+6-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.7+6 (build 21.0.7+6-LTS, mixed mode, sharing)