suer / redmine_milkode

12 stars 1 forks source link

Redmine 2.6.7のリポジトリよりmilkodeを使用して検索を行いたい(エラーとなる) #2

Open sw20 opened 8 years ago

sw20 commented 8 years ago

Redmineの導入をしているのですが、その際、Gitリポジトリより全文検索ができるということで、 Redmine Milkodeのプラグインをインストールさせていただいたのですが、うまく動きません。 milkodeのタブより、「設定」ボンタンを押下し出てきているGitのリポジトリを「追加」ボタンを押下すると エラーとなります。 Redmine2.6では使用できないということでしょうか? お教え頂けませんでしょうか。 ■環境 ruby:2.1.7 OS:Windows7 32bit Rails:3.2.22

Redmineのログには下記のエラーが出力されておりました。

Started GET "/projects/app_properuf/milkode/settings" for 157.9.20.145 at 2015-11-13 13:28:58 +0900 Processing by MilkodeController#settings as HTML Parameters: {"id"=>"app_properuf"} Current user: a-aaaaa (id=3) Rendered plugins/redmine_milkode/app/views/milkode/settings.html.erb within layouts/base (15.6ms) Rendered plugins/redmine_code_review/app/views/code_review/_html_header.html.erb (0.0ms) Rendered inline template (0.0ms) Rendered plugins/progressive_gantt_mods/app/views/application/_progressive_gantt_sidebar.html.erb (0.0ms) Rendered plugins/sidebar_hide/app/views/sidebar/_hideButton_partial.html.erb (0.0ms) Rendered plugins/redmine_code_review/app/views/code_review/_body_bottom.html.erb (0.0ms) Completed 200 OK in 78.0ms (Views: 46.8ms | ActiveRecord: 0.0ms) Started POST "/projects/app_properuf/milkode/add_repository?identifier=gp_milk2" for 157.9.20.145 at 2015-11-13 13:29:00 +0900 Processing by MilkodeController#add_repository as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"3bDkQE/vGab6+2l/uN1HOA1mzhn8HxrPGvUSjsE5ZEI=", "button"=>"", "identifier"=>"gp_milk2", "id"=>"app_properuf"} Current user: a-aaaaa (id=3) DEPRECATION WARNING: Mailer.deliver_alert_error_message(args) is deprecated. Use Mailer.alert_error_message(args).deliver instead. (called from method_missing at E:/redmine26/app/models/mailer.rb:443) Rendered plugins/redmine_admin_monitor/app/views/mailer/alert_error_message.text.erb within layouts/mailer (0.0ms) Rendered plugins/redmine_admin_monitor/app/views/mailer/alert_error_message.html.erb within layouts/mailer (0.0ms) Rendered common/error.html.erb within layouts/base (0.0ms) Rendered plugins/redmine_code_review/app/views/code_review/_html_header.html.erb (0.0ms) Rendered inline template (0.0ms) Rendered plugins/progressive_gantt_mods/app/views/application/_progressive_gantt_sidebar.html.erb (0.0ms) Rendered plugins/sidebar_hide/app/views/sidebar/_hideButton_partial.html.erb (0.0ms) Rendered plugins/redmine_code_review/app/views/code_review/_body_bottom.html.erb (0.0ms) Completed 500 Internal Server Error in 639.6ms (Views: 31.2ms | ActiveRecord: 78.0ms)

suer commented 8 years ago

Ruby のバージョンは違いますが、確認したところ以下の環境で動作しました。

Environment:
  Redmine version                2.6.7.stable
  Ruby version                   2.2.1-p85 (2015-02-26) [x86_64-darwin14]
  Rails version                  3.2.22

例えば、progressive_gantt_mods というプラグインを外すとどうなりますでしょうか?

sw20 commented 8 years ago

ご連絡いただきありがとうございます。 progressive_gantt_modsのプラグインを外して見たのですが、同じ結果でした。 動きませんでした。

やはり、プラグインを入れすぎているのが原因なのでしょうか。 ■現在入れているプラグインの一覧です。 redmine_absolute_dates redmine_admin_monitor redmine_code_review redmine_dynamic_file_link redmine_enter_cancel redmine_good_job redmine_holidays_plugin redmine_information redmine_issue_checklist redmine_issue_extensions redmine_issue_icons redmine_issue_templates redmine_journal_folder redmine_knowledgebase redmine_lightbox2 redmine_login_audit redmine_logs redmine_milkode redmine_open_links_in_new_window redmine_readme redmine_silencer redmine_theme_changer redmine_todo_scrum_plugin redmine_wiki_unc sidebar_hide status_button

■Redmineのページに表示されるエラーメッセージ An error occurred on the page you were trying to access, a message has been sent to Redmine administrator. If you continue to experience problems please contact your Redmine administrator for assistance

■progressive_gantt_mods を外した後のエラーメッセージ Started GET "/projects/app_properuf/milkode/index" for 157.9.20.145 at 2015-11-16 14:10:04 +0900 Processing by MilkodeController#index as HTML Parameters: {"id"=>"app_properuf"} Current user: a-aaaaa (id=3) Rendered plugins/redmine_milkode/app/views/milkode/index.html.erb within layouts/base (3.0ms) Rendered plugins/redmine_code_review/app/views/code_review/_html_header.html.erb (2.0ms) Rendered inline template (1.0ms) Rendered plugins/sidebar_hide/app/views/sidebar/_hideButton_partial.html.erb (1.0ms) Rendered plugins/redmine_code_review/app/views/code_review/_body_bottom.html.erb (0.0ms) Completed 200 OK in 52.0ms (Views: 39.0ms | ActiveRecord: 10.0ms) Started GET "/projects/app_properuf/milkode/settings" for 157.9.20.145 at 2015-11-16 14:10:06 +0900 Processing by MilkodeController#settings as HTML Parameters: {"id"=>"app_properuf"} Current user: a-aaaaa (id=3) Rendered plugins/redmine_milkode/app/views/milkode/settings.html.erb within layouts/base (10.0ms) Rendered plugins/redmine_code_review/app/views/code_review/_html_header.html.erb (2.0ms) Rendered inline template (1.0ms) Rendered plugins/sidebar_hide/app/views/sidebar/_hideButton_partial.html.erb (1.0ms) Rendered plugins/redmine_code_review/app/views/code_review/_body_bottom.html.erb (0.0ms) Completed 200 OK in 65.0ms (Views: 45.0ms | ActiveRecord: 15.0ms) Started POST "/projects/app_properuf/milkode/add_repository?identifier=gs" for 157.9.20.145 at 2015-11-16 14:10:08 +0900 Processing by MilkodeController#add_repository as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"3bDkQE/vGab6+2l/uN1HOA1mzhn8HxrPGvUSjsE5ZEI=", "button"=>"", "identifier"=>"gs", "id"=>"app_properuf"} Current user: a-aaaaa (id=3) DEPRECATION WARNING: Mailer.deliver_alert_error_message(_args) is deprecated. Use Mailer.alert_error_message(_args).deliver instead. (called from method_missing at E:/redmine26/app/models/mailer.rb:443) Rendered plugins/redmine_admin_monitor/app/views/mailer/alert_error_message.text.erb within layouts/mailer (2.0ms) Rendered plugins/redmine_admin_monitor/app/views/mailer/alert_error_message.html.erb within layouts/mailer (0.0ms) Rendered common/error.html.erb within layouts/base (0.0ms) Rendered plugins/redmine_code_review/app/views/code_review/_html_header.html.erb (1.0ms) Rendered inline template (0.0ms) Rendered plugins/sidebar_hide/app/views/sidebar/_hideButton_partial.html.erb (1.0ms) Rendered plugins/redmine_code_review/app/views/code_review/_body_bottom.html.erb (0.0ms) Completed 500 Internal Server Error in 574.0ms (Views: 37.0ms | ActiveRecord: 67.0ms)

よろしくお願い致します。

suer commented 8 years ago

Milkode のコマンド実行自体が失敗しているかもしれません。

以下のコマンドを実行するとどうなりますでしょうか。

$ cd Redmineのインストールディレクトリ/tmp/milkode/db
$ bundle exec milk add 追加したいリポジトリのパス
sw20 commented 8 years ago

redmineのインストールフォルダから milk コマンドで、リポジトリの登録をすると下記のエラーが発生しました。 「milkode.db not found」とエラーが出たのでフォルダを確認しましたが、 そこにはmilkodeのDBファイルは作られていませんでした。

インストールや初期設定等が、必要なのでしょうか? Redmineの通常のプラグインのインストールをしただけなのですが。 間違っていますでしょうか?

E:\redmine26>bundle exec milk add E:\var\git\GP.git Warning: this Gemfile contains multiple primary sources. Using source more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run bundle config disable_multisource true. Warning: this Gemfile contains multiple primary sources. Using source more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run bundle config disable_multisource true. Your Gemfile lists the gem simplecov-rcov (>= 0) more than once. You should probably keep only one of them. While it's not a problem now, it could cause errors if you change the version of just one of them later. Your Gemfile lists the gem yard (>= 0) more than once. You should probably keep only one of them. While it's not a problem now, it could cause errors if you change the version of just one of them later. Warning: this Gemfile contains multiple primary sources. Using source more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run bundle config disable_multisource true. The source :rubygems is deprecated because HTTP requests are insecure. Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not. Warning: this Gemfile contains multiple primary sources. Using source more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run bundle config disable_multisource true. Your Gemfile lists the gem simplecov (>= 0) more than once. You should probably keep only one of them. While it's not a problem now, it could cause errors if you change the version of just one of them later. Your Gemfile lists the gem simplecov-rcov (>= 0) more than once. You should probably keep only one of them. While it's not a problem now, it could cause errors if you change the version of just one of them later. C:/Ruby21/lib/ruby/gems/2.1.0/gems/milkode-0.6.3/lib/milkode/cdstk/cdstk.rb:734: in db_open': error : E:/redmine26/db/milkode.db not found!! (RuntimeError) from C:/Ruby21/lib/ruby/gems/2.1.0/gems/milkode-0.6.3/lib/milkode/cdstk/cdstk.rb:132:inblock in add' from C:/Ruby21/lib/ruby/gems/2.1.0/gems/milkode-0.6.3/lib/milkode/cdstk/cdstk.rb:656:in print_result' from C:/Ruby21/lib/ruby/gems/2.1.0/gems/milkode-0.6.3/lib/milkode/cdstk/cdstk.rb:130:inadd' from C:/Ruby21/lib/ruby/gems/2.1.0/gems/milkode-0.6.3/lib/milkode/cdstk/cli_cdstk.rb:86:in subcommand_default' from C:/Ruby21/lib/ruby/gems/2.1.0/gems/milkode-0.6.3/lib/milkode/cdstk/cli_cdstk.rb:42:inexecute' from C:/Ruby21/lib/ruby/gems/2.1.0/gems/milkode-0.6.3/bin/milk:10:in <top (required)>' from C:/Ruby21/bin/milk:23:inload' from C:/Ruby21/bin/milk:23:in `

'

E:\redmine26>

よろしくお願い致します。

suer commented 8 years ago

依存の関係でエラーが出ているような気がします。

bundle install の実行後の Gemfile.lock を貼っていただけますでしょうか。

suer commented 8 years ago

すみません。一点見落としていました。

実行していただきたいフォルダは Redmineのインストールディレクトリ/tmp/milkode/db ですが、 そのようなフォルダ自体できていないでしょうか。

sw20 commented 8 years ago

Redmineのインストールディレクトリに「/tmp/milkode/db」は作成されておりました。

sw20 commented 8 years ago

gemfile.lockのは下記の用になっております。

よろしくお願い致します。

GEM remote: https://rubygems.org/ remote: http://rubygems.org/ specs: actionmailer (3.2.22) actionpack (= 3.2.22) mail (~> 2.5.4) actionpack (3.2.22) activemodel (= 3.2.22) activesupport (= 3.2.22) builder (~> 3.0.0) erubis (~> 2.7.0) journey (~> 1.0.4) rack (~> 1.4.5) rack-cache (~> 1.2) rack-test (~> 0.6.1) sprockets (~> 2.2.1) activemodel (3.2.22) activesupport (= 3.2.22) builder (~> 3.0.0) activerecord (3.2.22) activemodel (= 3.2.22) activesupport (= 3.2.22) arel (~> 3.0.2) tzinfo (~> 0.3.29) activeresource (3.2.22) activemodel (= 3.2.22) activesupport (= 3.2.22) activesupport (3.2.22) i18n (~> 0.6, >= 0.6.4) multi_json (~> 1.0) acts-as-taggable-on (2.4.1) rails (>= 3, < 5) addressable (2.3.8) archive-zip (0.7.0) io-like (~> 0.3.0) arel (3.0.3) builder (3.0.4) capybara (2.5.0) mime-types (>= 1.16) nokogiri (>= 1.3.3) rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (~> 2.0) childprocess (0.5.6) ffi (~> 1.0, >= 1.0.11) coderay (1.1.0) daemons (1.2.3) docile (1.1.5) erubis (2.7.0) eventmachine (1.0.8) fastercsv (1.5.5) ffi (1.9.10-x86-mingw32) gqtp (1.0.6) groonga-client (0.1.9) gqtp (>= 1.0.4) groonga-command (>= 1.0.8) groonga-command (1.1.3) json haml (4.0.7) tilt highline (1.7.8) hike (1.2.3) holidays (2.2.0) i18n (0.6.11) io-like (0.3.0) journey (1.0.4) jquery-rails (3.1.4) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) json (1.8.3) launchy (2.4.3) addressable (~> 2.3) mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) metaclass (0.0.4) milkode (0.6.3) archive-zip (>= 0.4.0) coderay (>= 1.0.5) haml (>= 3.1.2) launchy (>= 0.3.7) rack (>= 1.3.4) rroonga (>= 1.1.0) sass (>= 3.1.3) sinatra (>= 1.2.6) termcolor (>= 1.2.0) thin (>= 1.2.10) mime-types (1.25.1) mini_portile (0.6.2) minitest (5.8.1) mocha (1.0.0) metaclass (~> 0.0.1) multi_json (1.11.2) mysql2 (0.3.20-x86-mingw32) net-ldap (0.3.1) nokogiri (1.6.6.2-x86-mingw32) mini_portile (~> 0.6.0) pkg-config (1.1.6) polyglot (0.3.5) power_assert (0.2.4) rack (1.4.7) rack-cache (1.5.0) rack (>= 0.4) rack-openid (1.4.2) rack (>= 1.1.0) ruby-openid (>= 2.1.8) rack-protection (1.5.3) rack rack-ssl (1.3.4) rack rack-test (0.6.3) rack (>= 1.0) rails (3.2.22) actionmailer (= 3.2.22) actionpack (= 3.2.22) activerecord (= 3.2.22) activeresource (= 3.2.22) activesupport (= 3.2.22) bundler (~> 1.0) railties (= 3.2.22) railties (3.2.22) actionpack (= 3.2.22) activesupport (= 3.2.22) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) rake (10.4.2) rbpdf (1.18.6) rdoc (3.12.2) json (~> 1.4) redcarpet (3.3.3) redmine_acts_as_taggable_on (1.0.0) acts-as-taggable-on (>= 2.3, < 2.5) request_store (1.0.5) rmagick (2.13.4) rroonga (5.0.9-x86-mingw32) archive-zip groonga-client (>= 0.0.3) json pkg-config ruby-openid (2.3.0) rubyzip (1.1.7) sass (3.4.19) selenium-webdriver (2.48.1) childprocess (~> 0.5) multi_json (~> 1.0) rubyzip (~> 1.0) websocket (~> 1.0) shoulda (3.3.2) shoulda-context (~> 1.0.1) shoulda-matchers (~> 1.4.1) shoulda-context (1.0.2) shoulda-matchers (1.4.1) activesupport (>= 3.0.0) simplecov (0.10.0) docile (~> 1.1.0) json (~> 1.8) simplecov-html (~> 0.10.0) simplecov-html (0.10.0) simplecov-rcov (0.2.3) simplecov (>= 0.4.1) sinatra (1.4.6) rack (~> 1.4) rack-protection (~> 1.4) tilt (>= 1.3, < 3) sprockets (2.2.3) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) termcolor (1.2.2) highline (>= 1.5.0) test-unit (3.1.5) power_assert thin (1.6.4) daemons (~> 1.0, >= 1.0.9) eventmachine (~> 1.0, >= 1.0.4) rack (~> 1.0) thor (0.19.1) tilt (1.4.1) treetop (1.4.15) polyglot polyglot (>= 0.3.1) tzinfo (0.3.45) websocket (1.2.2) xpath (2.0.0) nokogiri (~> 1.3) ya2yaml (0.31) yard (0.8.7.6)

PLATFORMS x86-mingw32

DEPENDENCIES activerecord-jdbc-adapter (~> 1.3.2) activerecord-jdbcmysql-adapter builder (>= 3.0.4) capybara coderay (~> 1.1.0) fastercsv (~> 1.5.0) holidays i18n (~> 0.6.11) jquery-rails (~> 3.1.3) milkode (= 0.6.3) mime-types minitest mocha (~> 1.0.0) mysql2 (~> 0.3.11) net-ldap (~> 0.3.1) rack-openid rails (= 3.2.22) rbpdf (~> 1.18.6) rdoc (>= 2.4.2) redcarpet (~> 3.3.2) redmine_acts_as_taggable_on (~> 1.0) request_store (= 1.0.5) rmagick (~> 2.13.4) ruby-openid (~> 2.3.0) selenium-webdriver shoulda (~> 3.3.2) shoulda-matchers (= 1.4.1) simplecov simplecov-rcov test-unit (~> 3.0) ya2yaml yard

BUNDLED WITH 1.10.6

suer commented 8 years ago

gem は正しくインストールされているようです。

気になる点としては、コマンド実行時のエラーメッセージが

in db_open': error : E:/redmine26/db/milkode.db not found!! (RuntimeError) from

となっていますが、コマンドは Redmineのインストールディレクトリ/tmp/milkode/db で実行していますでしょうか。