Project

General

Profile

Actions

Defect #16226

closed

Plugin routes not loaded

Added by Sergey Smith over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Cant reproduce
Affected version:

Description

When i instaled pluin redmine_inline_attach_screensho on Redmine 2.5.0.stable on Windows 2003 R2 Standart

All working except routes (i get 404 error on attach screenshot)

Environment:
Redmine version 2.5.0.stable
Ruby version 1.9.3-p327 (2012-11-10) [i386-mingw32]
Rails version 3.2.17
Environment production
Database adapter SQLite
SCM:
Subversion 1.8.5
Filesystem
Redmine plugins:
redmine_inline_attach_screenshot 0.4.6

Actions #1

Updated by Toshi MARUYAMA over 10 years ago

  • Category deleted (Plugin API)
  • Status changed from New to Closed
  • Resolution set to Invalid

Please contact plugin author.

Actions #2

Updated by Sergey Smith over 10 years ago

  • Status changed from Closed to Reopened

Plugin is valid.
I defined defect on Windows in file config/routes.rb:

  Dir.glob File.expand_path("plugins/*", Rails.root) do |plugin_dir|
    file = File.join(plugin_dir, "config/routes.rb")
    if File.exists?(file)
      begin
        instance_eval File.read(file)
      rescue Exception => e
        puts "An error occurred while loading the routes definition of #{File.basename(plugin_dir)} plugin (#{file}): #{e.message}." 
        exit 1
      end
    end
  end

It finds only plugin_dir = "<install_path>/plugins/."

Then i replace it with block:

  Dir.glob File.expand_path("plugins/*/config/routes.rb", Rails.root) do |file|
    if File.exists?(file)
      begin
        instance_eval File.read(file)
      rescue Exception => e
        puts "An error occurred while loading the routes definition of plugin (#{file}): #{e.message}." 
        exit 1
      end
    end
  end

But it loose info about Plugin name.

Actions #3

Updated by Toshi MARUYAMA over 10 years ago

  • Status changed from Reopened to Closed
  • Resolution changed from Invalid to Cant reproduce

I cannot reproduce.

$ ruby --version
ruby 1.9.3p545 (2014-02-24) [i386-mingw32]

$ hg pare
changeset:   10765:f214a31ab66d
tag:         tip
user:        jplang
date:        Sun Mar 02 11:05:26 2014 +0000
summary:     Watcher search now displays project members by default.

$ hg -R plugins/redmine-inline-attach-screenshot/ pare
changeset:   41:18585b827862
tag:         tip
user:        William Roush <xxxxxxxxxx>
date:        Wed Sep 18 00:25:20 2013 -0400
summary:     Added tag 0.4.6 for changeset 2a16a39e9570

$ RAILS_ENV=test rake routes | grep screen
                     attach_screenshot              /attach_screenshot(.:format)
                                                      attach_screenshot#index
Actions

Also available in: Atom PDF