Defect #2419
closed0.8.0: Warning from mime_type.rb: already initialized constant PDF
0%
Description
I run a cron job every minute to fetch the repository changesets. After the update to 0.8.0 I now get an email message every minute because the ruby script prints this warning:
mime_type.rb:66: warning: already initialized constant PDF
The command I run every minute is
/usr/bin/ruby /usr/lib/ruby/redmine/script/runner "Repository.fetch_changesets" -e production
It would be nice if this could be fixed so the warning goes away.
Updated by Eric Davis almost 16 years ago
- Status changed from New to 7
- Assignee set to Eric Davis
I think this occurred with the Rails 2.1 upgrade. I'll see what I can do.
Updated by Eric Davis almost 16 years ago
- Status changed from 7 to Resolved
I'm not getting this error on trunk, the 0.8 tag, or the 0.8-stable branch. Can you reproduce the error and post your the section of your production.log showing it?
Updated by Marc Liyanage almost 16 years ago
Weird, for some reason I wasn’t notified of your update on January 6th, even though I’m watching this topic...
Yes I can definitely reproduce it, I still get the e-mail with the warning every minute, as my cron job runs every minute.
/usr/lib/ruby/redmine/vendor/rails/actionpack/lib/action_controller/mime_type.rb:66: warning: already initialized constant PDF
I did a tail -f
on the production.log
file for a few minutes, and it was totally silent. The cron job doesn’t seem to produce anything there.
Here is the full cron job, stored in the system’s cron.d
directory:
# cat fetch-repository-changesets.cron MAILTO=mliyanage@futurelab.ch HOME=/var/www * * * * * root sh /data/redmine/bin/fetch-repository-changesets.sh
If I execute this manually on the shell, I get the same effect:
sh /data/redmine/bin/fetch-repository-changesets.sh /usr/lib/ruby/redmine/vendor/rails/actionpack/lib/action_controller/mime_type.rb:66: warning: already initialized constant PDF
The relevant line in that shell script is this here:
su -s /bin/bash - apache -c '/usr/bin/ruby /usr/lib/ruby/redmine/script/runner "Repository.fetch_changesets" -e production'
Some system info:
# ruby -v ruby 1.8.5 (2006-08-25) [i386-linux] # cat /etc/issue CentOS release 5 (Final)
Could it happen on this system because Ruby is at 1.8.5?
Updated by Eric Davis almost 15 years ago
- Category deleted (
SCM) - Status changed from Resolved to Closed
- Resolution set to Cant reproduce
I'm still not seeing this and haven't seen this in trunk since Rails 2.2.2. I'm guessing this was fixed with some changes in Redmine and Rails. After 0.9 is released and you upgrade, see if you still get this warning. If so, feel free to reopen this issue.