Project

General

Profile

Actions

Defect #13692

closed

warning: already initialized constant on Ruby 1.8.7

Added by Kieran Delaney about 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
Ruby support
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

When running the following command (either from the command line or git's post-receive hook) output generated produces warnings.

Command
rails runner "Repository.fetch_changesets" -e production

Warnings
/usr/lib64/ruby/gems/1.8/gems/coderay-1.0.9/lib/coderay/helpers/file_type.rb:19: warning: already initialized constant UnknownFileType
/usr/lib64/ruby/gems/1.8/gems/coderay-1.0.9/lib/coderay/helpers/file_type.rb:126: warning: already initialized constant TypeFromExt
/usr/lib64/ruby/gems/1.8/gems/coderay-1.0.9/lib/coderay/helpers/file_type.rb:132: warning: already initialized constant TypeFromShebang
/usr/lib64/ruby/gems/1.8/gems/coderay-1.0.9/lib/coderay/helpers/file_type.rb:138: warning: already initialized constant TypeFromName

We're running redmine via passenger, and almost exclusively calling this script from gits post-receive hook. No functionality is broken, it's just generating warning output in the developers git bash when they push and trigger the script, which is causing a little bit of panic.

We upgraded directly from 2.1.6 so I do not know if this affected 2.2.x

Actions

Also available in: Atom PDF