C:/Ruby23/lib/ruby/2.3.0/net/http.rb:933:in `connect_nonblock': SSL_connect returned=1 errno=0 state=error: certificate verify failed (OpenSSL::SSL::SSLError)
from C:/Ruby23/lib/ruby/2.3.0/net/http.rb:933:in `connect'
from C:/Ruby23/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
from C:/Ruby23/lib/ruby/2.3.0/net/http.rb:852:in `start'
from C:/Ruby23/lib/ruby/2.3.0/open-uri.rb:319:in `open_http'
from C:/Ruby23/lib/ruby/2.3.0/open-uri.rb:737:in `buffer_open'
from C:/Ruby23/lib/ruby/2.3.0/open-uri.rb:212:in `block in open_loop'
from C:/Ruby23/lib/ruby/2.3.0/open-uri.rb:210:in `catch'
from C:/Ruby23/lib/ruby/2.3.0/open-uri.rb:210:in `open_loop'
from C:/Ruby23/lib/ruby/2.3.0/open-uri.rb:151:in `open_uri'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/open_uri_redirections-0.2.1/lib/open-uri/redirections_patch.rb:55:in `open_uri'
from C:/Ruby23/lib/ruby/2.3.0/open-uri.rb:717:in `open'
from C:/Ruby23/lib/ruby/2.3.0/open-uri.rb:35:in `open'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/narou/api.rb:58:in `request_api'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/narou/api.rb:51:in `block in request'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/narou/api.rb:49:in `each'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/narou/api.rb:49:in `each_slice'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/narou/api.rb:49:in `with_index'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/narou/api.rb:49:in `request'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/command/update/general_lastup_updater.rb:39:in `block in update_narou_novels'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/command/update/general_lastup_updater.rb:37:in `each'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/command/update/general_lastup_updater.rb:37:in `update_narou_novels'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/command/update.rb:294:in `update_general_lastup'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/command/update.rb:86:in `block in initialize'
from C:/Ruby23/lib/ruby/2.3.0/optparse.rb:1547:in `block in parse_in_order'
from C:/Ruby23/lib/ruby/2.3.0/optparse.rb:1534:in `catch'
from C:/Ruby23/lib/ruby/2.3.0/optparse.rb:1534:in `parse_in_order'
from C:/Ruby23/lib/ruby/2.3.0/optparse.rb:1528:in `order!'
from C:/Ruby23/lib/ruby/2.3.0/optparse.rb:1620:in `permute!'
from C:/Ruby23/lib/ruby/2.3.0/optparse.rb:1642:in `parse!'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/commandbase.rb:43:in `execute'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/command/update.rb:150:in `execute'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/commandline.rb:46:in `run'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/narou.rb:52:in `block in <top (required)>'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/backtracer.rb:16:in `capture'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/narou.rb:51:in `<top (required)>'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/bin/narou:10:in `require_relative'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/bin/narou:10:in `<top (required)>'
from C:/Ruby23/bin/narou:22:in `load'
from C:/Ruby23/bin/narou:22:in `<main>'
ERROR: Error installing narou:
The last version of ffi (< 2, >= 0.5.0) to support your Ruby & RubyGems was 1.9.18. Try installing it with `gem install ffi -v 1.9.18` and then running the current command again
ffi requires Ruby version < 2.5, >= 2.0. The current ruby version is 2.5.0.
なんとかなろうをインストールできたような。
Successfully installed narou-3.1.11とでましたが、今度は、
>narou web ui
を呼び出そうとすると、以下の文が出て「WEB UI」が出てきません…。
C:/Ruby23/lib/ruby/2.3.0/psych.rb:379:in `parse': (C:/Users/michifura/.narou/database.yaml): control characters are not allowed at line 1 column 1 (Psych::SyntaxError)
from C:/Ruby23/lib/ruby/2.3.0/psych.rb:379:in `parse_stream'
from C:/Ruby23/lib/ruby/2.3.0/psych.rb:327:in `parse'
from C:/Ruby23/lib/ruby/2.3.0/psych.rb:254:in `load'
from C:/Ruby23/lib/ruby/2.3.0/psych.rb:475:in `block in load_file'
from C:/Ruby23/lib/ruby/2.3.0/psych.rb:474:in `open'
from C:/Ruby23/lib/ruby/2.3.0/psych.rb:474:in `load_file'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/inventory.rb:52:in `rescue in block in init'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/inventory.rb:45:in `block in init'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/helper.rb:459:in `block in memo'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/helper.rb:452:in `synchronize'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/helper.rb:452:in `memo'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/inventory.rb:44:in `init'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/inventory.rb:22:in `block in load'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/inventory.rb:20:in `tap'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/inventory.rb:20:in `load'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/database.rb:28:in `refresh'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/database.rb:24:in `initialize'
from C:/Ruby23/lib/ruby/2.3.0/singleton.rb:142:in `new'
from C:/Ruby23/lib/ruby/2.3.0/singleton.rb:142:in `block in instance'
from C:/Ruby23/lib/ruby/2.3.0/singleton.rb:140:in `synchronize'
from C:/Ruby23/lib/ruby/2.3.0/singleton.rb:140:in `instance'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/downloader.rb:242:in `<class:Downloader>'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/downloader.rb:22:in `<top (required)>'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/command/backup.rb:7:in `require_relative'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/command/backup.rb:7:in `<top (required)>'
from C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/command.rb:9:in `block in <top (required)>'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/command.rb:8:in `glob'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/command.rb:8:in `<top (required)>'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/commandline.rb:7:in `require_relative'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/lib/commandline.rb:7:in `<top (required)>'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/narou.rb:45:in `require_relative'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/narou.rb:45:in `<top (required)>'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/bin/narou:10:in `require_relative'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/narou-3.1.11/bin/narou:10:in `<top (required)>'
from C:/Ruby23/bin/narou:22:in `load'
from C:/Ruby23/bin/narou:22:in `<main>'
win10proの環境でruby 2.5.3のインストールまで実行したのですが
gem install narouを実行すると
ERROR: While executing gem ... (Errno::EADDRNOTAVAIL)
The requested address is not valid in its context. - connect(2) for "0.0.0.0" port 53
とエラーが出てしまいます。
1点質問させてください。
Ubuntu上でnarou web を実行し、外向きの受信ポートを解放(ex.8080+1)して外部から接続し、WebUIを操作しようとしました。(良い子はしちゃだめですね!!!)
しかし現状、UI上のダウンロードボタンなどのボタン系やサーバー再起動、narou.rbについてなどが表示できません。(環境設定やヘルプは入れます。)
>>158
ttps://www.ruby.or.jp/ja/tech/install/ruby/install_win.html
2-4.セットアップ画面
「Add Ruby executables to your PATH」(Rubyの実行ファイルを環境変数PATHに登録する)と
「Associate .rb and .rbw files with this Ruby installation」(拡張子.rbと.rbwをRubyの実行ファイルに
関連付ける)のオプションにチェックをつけてから[Install]ボタ ンをクリックしてください。
/usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.4.1/lib/fileutils.rb:1413:in `initialize': No such file or directory @ rb_sysopen - /Users/hrm0107/小説データ/小説家になろう/n6982cx ドラゴンー(卵×転生)=猫/[Ceez] ドラゴンー(卵×転生)=猫.mobi (Errno::ENOENT)
from /usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.4.1/lib/fileutils.rb:1413:in `open'
from /usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.4.1/lib/fileutils.rb:1413:in `copy_file'
from /usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.4.1/lib/fileutils.rb:511:in `copy_file'
from /usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.4.1/lib/fileutils.rb:430:in `block in cp'
from /usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.4.1/lib/fileutils.rb:1588:in `block in fu_each_src_dest'
from /usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.4.1/lib/fileutils.rb:1602:in `fu_each_src_dest0'
from /usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.4.1/lib/fileutils.rb:1586:in `fu_each_src_dest'
from /usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.4.1/lib/fileutils.rb:429:in `cp'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/command/convert.rb:320:in `copy_to_converted_file'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/command/convert.rb:255:in `block in convert_novel_main'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/command/convert.rb:248:in `each'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/command/convert.rb:248:in `convert_novel_main'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/command/convert.rb:201:in `block (2 levels) in convert_novels'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/mixin/locker.rb:26:in `lock'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/command/convert.rb:200:in `block in convert_novels'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/command/convert.rb:199:in `each'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/command/convert.rb:199:in `with_index'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/command/convert.rb:199:in `convert_novels'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/command/convert.rb:159:in `block in main'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/command/convert.rb:152:in `each'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/command/convert.rb:152:in `main'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/command/convert.rb:133:in `execute'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/commandbase.rb:125:in `execute!'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/commandbase.rb:134:in `execute!'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/command/convert.rb:123:in `block in execute!'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/narou.rb:363:in `concurrency_call'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/command/convert.rb:122:in `execute!'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/commandline.rb:29:in `run'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/commandline.rb:43:in `run!'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/narou.rb:50:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/lib/backtracer.rb:16:in `capture'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/narou.rb:49:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/bin/narou:13:in `require_relative'
from /usr/local/lib/ruby/gems/2.5.0/gems/narou-3.5.0.1/bin/narou:13:in `<top (required)>'
from /usr/local/bin/narou:23:in `load'
from /usr/local/bin/narou:23:in `<main>'
>>233
narou list の検索機能が欲しかったのですが、
>>標準機能だけではできませんが、csv 出力機能があるのでどうとでもなると思います
ということで、
narou csv | textql -header -sql "select id, title where title like '%異世界%'"
等、ガンガン検索できるようになりました。
削除も
narou csv | textql -header -sql "select id where title like '%生産魔法師%' and frozen = 'false'" | tr '\n' ' ' | narou remove -wy
のように,いろいろできます。
条件が自分で自由自在にできるので最強です。
デバイス名:~ ユーザー名$narou trace
日付
/Users/ユーザー名/.rbenv/versions/3.0.0/bin/narou web --boot
/Users/ユーザー名/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1773:in `detect_rack_handler': Server handler (webrick) not found. (RuntimeError)
from /Users/ユーザー名/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1438:in `run!'
from /Users/ユーザー名/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/narou-3.5.1/lib/command/web.rb:144:in `boot'
from /Users/ユーザー名/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/narou-3.5.1/lib/command/web.rb:87:in `execute'
from /Users/ユーザー名/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/narou-3.5.1/lib/commandbase.rb:125:in `execute!'
from /Users/ユーザー名/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/narou-3.5.1/lib/commandbase.rb:134:in `execute!'
from /Users/ユーザー名/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/narou-3.5.1/lib/commandline.rb:29:in `run'
from /Users/ユーザー名/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/narou-3.5.1/lib/commandline.rb:43:in `run!'
from /Users/ユーザー名/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/narou-3.5.1/narou.rb:50:in `block in <top (required)>'
from /Users/ユーザー名/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/narou-3.5.1/lib/backtracer.rb:16:in `capture'
from /Users/ユーザー名/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/narou-3.5.1/narou.rb:49:in `<top (required)>'
from /Users/ユーザー名/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/narou-3.5.1/bin/narou:13:in `require_relative'
from /Users/ユーザー名/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/narou-3.5.1/bin/narou:13:in `<top (required)>'
from /Users/ユーザー名/.rbenv/versions/3.0.0/bin/narou:23:in `load'
from /Users/ユーザー名/.rbenv/versions/3.0.0/bin/narou:23:in `<main>'
書き込み失礼致します、
Macにてインストールしているのですが、『ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.』と出てしまって出来ません。
他のサイトなども見ながらやっているのですが、出来ませんでした…。どなたかわかる方教えてください
書き込み失礼致します、
Macにてインストールしているのですが、『ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.』と出てしまって出来ません。
他のサイトなども見ながらやっているのですが、出来ませんでした…。どなたかわかる方教えてください
/Users/yui023/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/narou-3.7.0/lib/command/init.rb:118:in `read': No such file or directory @ rb_sysopen - /Users/yui023/AozoraEpub3-なろう用/chuki_tag.txt (Errno::ENOENT)
from /Users/yui023/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/narou-3.7.0/lib/command/init.rb:118:in `rewrite_aozoraepub3_files'
from /Users/yui023/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/narou-3.7.0/lib/command/init.rb:106:in `init_aozoraepub3'
WEB UIの表示
[ERROR] C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/narou-3.8.0/lib/device.rb:153:in `copy_to_documents': ディレクトリまたはファイルを作成できません。 (Device::SendFailure)
コマンドプロンプトの表示
[2021-10-09 23:39:24] FATAL SystemExit: exit
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/narou-3.8.0/lib/device.rb:174:in `exit'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/narou-3.8.0/lib/device.rb:174:in `rescue in copy_to_documents'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/narou-3.8.0/lib/device.rb:143:in `copy_to_documents'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/narou-3.8.0/lib/command/send.rb:150:in `block (3 levels) in execute'
[2021-10-09 23:39:24] INFO going to shutdown ...
[2021-10-09 23:39:24] INFO WEBrick::HTTPServer#start done.
== Sinatra has ended his set (crowd applauds)
>>333
rubyをインストールするときに全てチェックのところは記載された通りにしました。
ただそもそもgem install narouがerrorが出ていました。
C:\Users\kkk_e>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:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/psych-4.0.3/ext/psych
C:/Ruby27-x64/bin/ruby.exe -I C:/Ruby27-x64/lib/ruby/2.7.0 -r ./siteconf20220223-10488-u9htw5.rb extconf.rb
checking for yaml.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby27-x64/bin/$(RUBY_BASE_NAME)
--with-libyaml-dir
--without-libyaml-dir
--with-libyaml-include
--without-libyaml-include=${libyaml-dir}/include
--with-libyaml-lib
--without-libyaml-lib=${libyaml-dir}/lib
--enable-bundled-libyaml
--disable-bundled-libyaml
C:/Ruby27-x64/lib/ruby/2.7.0/mkmf.rb:471:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from C:/Ruby27-x64/lib/ruby/2.7.0/mkmf.rb:613:in `try_cpp'
from C:/Ruby27-x64/lib/ruby/2.7.0/mkmf.rb:1177:in `block in find_header'
from C:/Ruby27-x64/lib/ruby/2.7.0/mkmf.rb:971:in `block in checking_for'
from C:/Ruby27-x64/lib/ruby/2.7.0/mkmf.rb:361:in `block (2 levels) in postpone'
from C:/Ruby27-x64/lib/ruby/2.7.0/mkmf.rb:331:in `open'
from C:/Ruby27-x64/lib/ruby/2.7.0/mkmf.rb:361:in `block in postpone'
from C:/Ruby27-x64/lib/ruby/2.7.0/mkmf.rb:331:in `open'
from C:/Ruby27-x64/lib/ruby/2.7.0/mkmf.rb:357:in `postpone'
from C:/Ruby27-x64/lib/ruby/2.7.0/mkmf.rb:970:in `checking_for'
from C:/Ruby27-x64/lib/ruby/2.7.0/mkmf.rb:1176:in `find_header'
from extconf.rb:10:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
Gem files will remain installed in C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/psych-4.0.3 for inspection.
Results logged to C:/Ruby27-x64/lib/ruby/gems/2.7.0/extensions/x64-mingw32/2.7.0/psych-4.0.3/gem_make.out
rubyのバージョンを3.1.1にしてもう一回インストールしなおしてinitしようとするとこうなりました
narou init
/Users/username/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/narou-3.8.1/lib/inventory.rb:45:in `merge!': no implicit conversion of false into Hash (TypeError)
from /Users/username/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/narou-3.8.1/lib/inventory.rb:45:in `init'
from /Users/username/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/narou-3.8.1/lib/inventory.rb:23:in `block in load'
from <internal:kernel>:90:in `tap'
from /Users/username/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/narou-3.8.1/lib/inventory.rb:21:in `load'
from /Users/username/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/narou-3.8.1/narou.rb:38:in `<top (required)>'
from /Users/username/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/narou-3.8.1/bin/narou:13:in `require_relative'
from /Users/username/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/narou-3.8.1/bin/narou:13:in `<top (required)>'
from /Users/username/.rbenv/versions/3.1.1/bin/narou:25:in `load'
from /Users/username/.rbenv/versions/3.1.1/bin/narou:25:in `<main>'
パソコン割と初心者なんでわけわかめですたすけてください
************************************************************
Successfully installed narou-3.8.1
Parsing documentation for narou-3.8.1
Installing ri documentation for narou-3.8.1
Done installing documentation for narou after 1 seconds
1 gem installed
RubyGems installed the following executables:
C:/Ruby31-x64/bin/gem
C:/Ruby31-x64/bin/bundle
C:/Ruby31-x64/bin/bundler
Ruby Interactive (ri) documentation was installed. ri is kind of like man
pages for Ruby libraries. You may access it like this:
ri Classname
ri Classname.class_method
ri Classname#instance_method
If you do not wish to install this documentation in the future, use the
--no-document flag, or set it as the default in your ~/.gemrc file. See
'gem help env' for details.
先程の補足です
WEB UIでKindle変換してもだめだったのでepub変換を指定してみました
DL済のものは送信がmobi語尾になってしまいメール受信不可(アマゾンから通知メール)
新規DLしたものはepub変換出来たのですが、メール送信する段階で「まだファイル(題名)mobiがないようです」となりメール送信自体が出来ませんでした
Send to kindleで仕様変更があったようです。
jp.amazonforum.comのKindle無料アプリに関する一般的な質問にある「kindleパーソナルドキュメントのタイトルと著者名が正しく反映されない」を参照してください。
もしかすると英語のフォーラムにはもっと詳しいものがあるかもしれませんが探していません。
挿絵が複数枚ある小説をepubに変換しようとすると途中でエラーが出てしまうのですが、解決する方法は無いのでしょうか?
エラーです↓
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:520)
... 8 more
pid 3560 exit 1
以下が試したことです
javaのversion up
元は1.8.0_371より古いものだったと思いますが公式サイトから最新のものをインストールしましたがエラーに変化なし
AozoraEpub3のversion up
元はAozoraEpub3-1.1.0b55QでしたがAozoraEpub3-1.1.1b14Qに変更してもエラーに変化なし
rubyのversion up
元は確か3.1.XだったハズですがアンイントールしてRubyInstallerから最新のものをインストールしましたがエラーに変化なし
Narou.rb のバージョン:3.8.1→3.8.2もエラーに変化なし
AozoraEpub3.jar をクリックして開いたWindowにTxtを直接ドラッグ&ドロップすると、.mobiや.pubは作成出来ます。
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/narou-3.8.1/lib/extension.rb:35:in `write': No such file or directory @ rb_sysopen - D:/winapri/AozoraEpub3-1.1.1b15Q/template/OPS/css_custom/8b1c5cf7decbeb5a2f838a9195b8bd (Errno::ENOENT)
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/narou-3.8.1/lib/extension.rb:35:in `write'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/narou-3.8.1/lib/helper.rb:379:in `erb_copy'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/narou-3.8.1/lib/command/init.rb:136:in `block in rewrite_aozoraepub3_files'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/narou-3.8.1/lib/command/init.rb:133:in `times'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/narou-3.8.1/lib/command/init.rb:133:in `rewrite_aozoraepub3_files'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/narou-3.8.1/lib/command/init.rb:106:in `init_aozoraepub3'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/narou-3.8.1/lib/command/init.rb:74:in `execute'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/narou-3.8.1/lib/commandbase.rb:125:in `execute!'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/narou-3.8.1/lib/commandbase.rb:134:in `execute!'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/narou-3.8.1/lib/commandline.rb:29:in `run'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/narou-3.8.1/lib/commandline.rb:43:in `run!'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/narou-3.8.1/narou.rb:50:in `block in <top (required)>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/narou-3.8.1/lib/backtracer.rb:16:in `capture'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/narou-3.8.1/narou.rb:49:in `<top (required)>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/narou-3.8.1/bin/narou:13:in `require_relative'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/narou-3.8.1/bin/narou:13:in `<top (required)>'
from C:/Ruby31-x64/bin/narou:32:in `load'
from C:/Ruby31-x64/bin/narou:32:in `<main>'
Exception in thread "main" java.lang.UnsupportedClassVersionError: AozoraEpub3 has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
pid 13928 exit 1
[ERROR] JavaがインストールされていないかAozoraEpub3実行時にエラーが発生しました。EPUBを作成出来ませんでした
小説の保存フォルダを開きますか (y/n)?:
/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を作成出来ませんでした