Coder Social home page Coder Social logo

happy-se-life / like Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 3.0 1.65 MB

Like plugin for redmine

Home Page: https://it-managers-life.hatenablog.com/entry/2020/02/02/203908

License: MIT License

Ruby 60.24% HTML 20.91% JavaScript 13.41% CSS 5.43%
redmine redmine-plugin

like's Issues

In Ruby 3, the error "undefined method `decode' for URI:Module" occurs

URI.decode method is removed on Ruby 3.

My Redmine environment is as follows.

Environment:
  Redmine version                5.1.0
  Ruby version                   3.1.4-p223 (2023-03-30) [x64-mingw-ucrt]
  Rails version                  6.1.7.6

The log at the time of the error occurrence is as follows.

Started GET "/product/projects/some_project_id/wiki" for 127.0.0.1 at 2023-11-21 07:32:13 +0900
Processing by WikiController#show as HTML
  Parameters: {"project_id"=>"some_project_id"}
  Current user: admin (id=1)
  Rendered wiki/show.html.erb within layouts/base (Duration: 160.3ms | Allocations: 24625)
  Rendered inline template (Duration: 0.5ms | Allocations: 282)
  Rendered layout layouts/base.html.erb (Duration: 270.4ms | Allocations: 56613)
Completed 500 Internal Server Error in 339ms (ActiveRecord: 31.9ms | Allocations: 72977)
  
ActionView::Template::Error (undefined method `decode' for URI:Module

        wiki_title = URI.decode(request.path.split("/").last)
                        ^^^^^^^):
    106:         <%= view_layouts_base_sidebar_hook_response %>
    107:     </div>
    108: 
    109:     <div id="content">
    110:         <%= render_flash_messages %>
    111:         <%= yield %>
    112:         <%= call_hook :view_layouts_base_content %>
  
plugins/like/lib/like/hooks.rb:35:in `view_layouts_base_content'
lib/redmine/hook.rb:66:in `block (2 levels) in call_hook'
lib/redmine/hook.rb:66:in `each'
lib/redmine/hook.rb:66:in `block in call_hook'
lib/redmine/hook.rb:63:in `call_hook'
lib/redmine/hook.rb:101:in `call_hook'
app/views/layouts/base.html.erb:109
lib/redmine/sudo_mode.rb:61:in `sudo_mode'

ハートマークが複数出てしまう注記があります。

プラグインをRedmineVersion4.1にインストールしたところ、
ハートマークが複数出てしまう注記があります。(出るものと出ないものの法則性が分からず...)
解決方法をご教示頂けないでしょうか?

ちなみに、インストール時に以下エラーが出ました。
rake aborted!
StandardError: An error has occurred, all later migrations canceled:
Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:
class CreateLikes < ActiveRecord::Migration[4.2]

そのため以下ステップを修正しています。
001_create_likes.rb
修正前
class CreateLikes < ActiveRecord::Migration
修正後
class CreateLikes < ActiveRecord::Migration[5.2]

どうぞよろしくお願い致します。

誰がいいね!したか分かると嬉しいです。

現在いいね!されたカウント数が分かりますが、
誰がいいね!したか分かると、もっと嬉しいです。
(チケット作成者や注記を書いた人が、「誰が読んでいるか」が分かると、連絡を取れる手段にもなりモチベーションも上がるのかなと)

もしお時間等ありましたら、よろしくお願いいたします😀

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.