Project

General

Profile

Actions

Defect #31337

closed

Explicitly load redmine/info in order to avoid "uninitialized constant" error

Added by Lluís Gili almost 5 years ago. Updated almost 5 years ago.

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

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

with Rails.env production, where we have:

  config.cache_classes = true
  config.eager_load = true

if you comment this line on lib/redmine.rb

  #menu.push :help, Redmine::Info.help_url, :last => true

accessing http://localhost:3000/admin/info crashes with

  uninitialized constant Redmine::Info
Did you mean?  TZInfo
  app/views/admin/info.html.erb:3:in `_app_views_admin_info_html_erb__3650592729958042480_47028059654180'

rails 5 does not autoload code in production and does not eager_load lib, so shouldn't lib files be moved to app? (or required in a initializer)

Actions

Also available in: Atom PDF