前提・実現したいこと
Rails製文字列抽出サーバーchupa-text-http-serverをWindowsサービスとして登録、管理したい。
Bitnami Redmineのサービスマネージャーでサービスの開始/停止がしたい。
当方、Rubyのことはさっぱりわかりません…
環境
Windows7 x64
Bitnami Redmine 4.0.5
Redmineは"C:\Bitnami"にインストールしてあります。
RubyはBitnami Redmineの物を使用
試したこと
use_redmine.batを起動しchupa-textの導入、起動を確認
cd C:\Bitnami git clone https://github.com/ranguba/chupa-text-http-server.git cd C:\Bitnami\chupa-text-http-server bundle install rails s
ネットで検索した情報だと"thin"でサービス化できるようなので
Gemfileにgem 'thin'を追加してthin startでサーバー起動を確認
bundle install gem uninstall -I eventmachine gem install eventmachine --platform ruby thin start
サービス登録
"C:\Bitnami\redmine/apps/redmine\scripts\winserv.exe" install "ChupaText" -start auto "C:\Bitnami\redmine\ruby\bin\ruby.exe" "C:\Bitnami\redmine/apps/redmine\htdocs\bin\thin" start -e production -c "C:\Bitnami\chupa-text-http-server" -p 3000 -a 127.0.0.1
サービス登録されますが起動できません。
コマンドを分解して実行すると下記のエラーが発生します。
C:\Bitnami\chupa-text-http-server>"C:\Bitnami\redmine\ruby\bin\ruby.exe" "C:\Bitnami\redmine/apps/redmine\htdocs\bin\thin" start -e production -c "C:\Bitnami\chupa-text-http-server" -p 3000 -a 127.0.0.1 Using rack adapter Traceback (most recent call last): 21: from C:/Bitnami/redmine/apps/redmine/htdocs/bin/thin:29:in `<main>' 20: from C:/Bitnami/redmine/apps/redmine/htdocs/bin/thin:29:in `load' 19: from C:/Bitnami/redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/thin-1.7.2-x64-mingw32/bin/thin:6:in `<top (required)>' 18: from C:/Bitnami/redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/thin-1.7.2-x64-mingw32/lib/thin/runner.rb:159:in `run!' 17: from C:/Bitnami/redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/thin-1.7.2-x64-mingw32/lib/thin/runner.rb:203:in `run_command' 16: from C:/Bitnami/redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/thin-1.7.2-x64-mingw32/lib/thin/controllers/controller.rb:74:in `start' 15: from C:/Bitnami/redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/thin-1.7.2-x64-mingw32/lib/thin/controllers/controller.rb:170:in `load_adapter' 14: from C:/Bitnami/redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/thin-1.7.2-x64-mingw32/lib/rack/adapter/loader.rb:42:in `for' 13: from C:/Bitnami/redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/thin-1.7.2-x64-mingw32/lib/rack/adapter/loader.rb:33:in `load' 12: from C:/Bitnami/redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/thin-1.7.2-x64-mingw32/lib/rack/adapter/loader.rb:33:in `eval' 11: from C:/Bitnami/chupa-text-http-server/config.ru:1:in `<main>' 10: from C:/Bitnami/chupa-text-http-server/config.ru:1:in `new' 9: from C:/Bitnami/redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in `initialize' 8: from C:/Bitnami/redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in `instance_eval' 7: from C:/Bitnami/chupa-text-http-server/config.ru:3:in `block in <main>' 6: from C:/Bitnami/chupa-text-http-server/config.ru:3:in `require_relative' 5: from C:/Bitnami/chupa-text-http-server/config/environment.rb:2:in `<top (required)>' 4: from C:/Bitnami/chupa-text-http-server/config/environment.rb:2:in `require_relative' 3: from C:/Bitnami/chupa-text-http-server/config/application.rb:1:in `<top (required)>' 2: from C:/Bitnami/chupa-text-http-server/config/application.rb:1:in `require_relative' 1: from C:/Bitnami/chupa-text-http-server/config/boot.rb:4:in `<top (required)>' C:/Bitnami/chupa-text-http-server/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError)
下記だと起動するので環境やコマンドのつなぎ方が問題なのかなと思っています。
thin start -e production -c "C:\Bitnami\chupa-text-http-server" -p 3000 -a 127.0.0.1
分かる方助言お願いします。
あなたの回答
tips
プレビュー