Hello Adi, thanks for your bug report

On Thu, Mar 05, 2015 at 12:01:41PM +0100, Adi Kriegisch wrote:
> Package: redmine
> Version: 2.5.1-2~bpo70+5
> Severity: minor
> Tags: patch
> 
> Hey!
> 
> I am running redmine from backports and packaged the necessary dependencies
> of the redmine_dmsf[1] plugin. After installing (rake) the plugin, I get
> the following error message:
>   |   Rendered admin/plugins.html.erb within layouts/admin (64.9ms)
>   | Completed 500 Internal Server Error in 149.0ms
>   | 
>   | ActionView::Template::Error (can not load translations from
>   | /usr/lib/ruby/vendor_ruby/../locales/en.yml: #<TypeError: no implicit
>   | conversion from nil to integer>):
>   |     1: <%= title l(:label_plugins) %>
>   |     2:
>   |     3: <% if @plugins.any? %>
>   |     4: <table class="list plugins">
>   |   lib/redmine/i18n.rb:153:in `init_translations'
>   |   lib/redmine/i18n.rb:167:in `lookup'
>   |   lib/redmine/i18n.rb:27:in `l'
>   |   app/views/admin/plugins.html.erb:1:in
>   | `_app_views_admin_plugins_html_erb__1842134549454110237_58120100'
> 
> The interesting part here is that somehow
> "/usr/lib/ruby/vendor_ruby/../locales/en.yml" gets added to the list of
> translations to load; this path, of course, does not exist and the loading
> fails.
> This is the list of files to load without plugins:
>     "/usr/lib/ruby/vendor_ruby/active_support/locale/en.yml", 
>     "/usr/lib/ruby/vendor_ruby/active_model/locale/en.yml",
>     "/usr/lib/ruby/vendor_ruby/active_record/locale/en.yml",
>     "/usr/lib/ruby/vendor_ruby/action_view/locale/en.yml",
>     "/usr/share/redmine/config/locales/en.yml"
> when adding/enabling redmine_dmsf these paths get added:
>     "/usr/lib/ruby/vendor_ruby/active_support/locale/en.yml",
>     "/usr/lib/ruby/vendor_ruby/active_model/locale/en.yml",
>     "/usr/lib/ruby/vendor_ruby/active_record/locale/en.yml",
>     "/usr/lib/ruby/vendor_ruby/action_view/locale/en.yml",
>   + "/usr/lib/ruby/vendor_ruby/../locales/en.yml",
>     "/usr/share/redmine/config/locales/en.yml",
>   + "/usr/share/redmine/plugins/redmine_dmsf/config/locales/en.yml"
> 
> Reporting this to the module's author[2] did not lead to any helpful answer
> yet. The same issue has been reported before[3] together with a different
> bug that has been fixed.
> I am pretty sure that this issue is thightly related to the redmine_dmsf
> plugin as other plugins do not show that behavior...
> 
> I created a workaround for the issue (see attached patch) that checks if a
> translation exists before loading it.
> 
> I hope you can help me find a better solution!

I couldn't find anything in the redmine_dmsf code that that would do
that, so I think this is caused either by one of the dependencies you
packaged, or by one of its dependencies. This type of issue if more or
less common with packages that are actually rails engines.

Can you look for the guilty package in your system? I think this command
should find something:

  $ grep -rl /__FILE__.*\.\.\/locales/ /usr/lib/ruby/vendor_ruby/

Looking at the redmine_dmsf Gemfile, the dependencies that are not
alreay in Debian seem to be useful, don't you want to join the Ruby team
and maintain those in Debian?

-- 
Antonio Terceiro <terce...@debian.org>

Attachment: signature.asc
Description: Digital signature

Reply via email to