Aug 22, 2012

Redmine: application.rb:56:in `instance_eval': uninitialized constant Class::PATH (NameError)

Redmine:
-Báo lỗi dở hơi, khó hiểu
- Lỗi do " additional_environment.rb" nhưng error log lại báo ở
application.rb:56

[root@redmine redmine]# ruby script/rails server webrick -e production
/var/www/redmine-2.0/config/application.rb:56:in `instance_eval':
uninitialized constant Class::PATH (NameError)
from /var/www/redmine-2.0/config/application.rb:56:in
`instance_eval'
from /var/www/redmine-2.0/config/application.rb:56:in
`<class:Application>'
from /var/www/redmine-2.0/config/application.rb:13:in
`<module:RedmineApp>'
from /var/www/redmine-2.0/config/application.rb:12:in `<top
(required)>'
from
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.6/lib/rails/commands.rb:53:in
`require'
from
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.6/lib/rails/commands.rb:53:in
`block in <top (required)>'
from
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.6/lib/rails/commands.rb:50:in
`tap'
from
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.6/lib/rails/commands.rb:50:in
`<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
[root@redmine redmine]# /usr/bin/ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [i386-linux]
[root@redmine redmine]# /usr/local/bin/ruby -v
ruby 1.9.3p194 (2012-04-20) [i686-linux]
[root@redmine redmine]# rpm -e ruby
error: Failed dependencies:
ruby = 1.8.7.352-7.el6_2 is needed by (installed)
ruby-irb-1.8.7.352-7.el6_2.i686
/usr/bin/ruby is needed by (installed)
ruby-irb-1.8.7.352-7.el6_2.i686
/usr/bin/ruby is needed by (installed)
ruby-rdoc-1.8.7.352-7.el6_2.i686
/usr/bin/ruby is needed by (installed) rubygems-1.3.7-1.el6.noarch
[root@redmine redmine]# rpm -e ruby rubyirb ruby-rdoc rubygems
error: package rubyirb is not installed
[root@redmine redmine]# rpm -e ruby ruby-irb ruby-rdoc rubygems

[root@redmine ~]# uname -a
Linux redmine.nev-cloudlab.com 2.6.32-279.el6.i686 #1 SMP Fri Jun 22
10:59:55 UTC 2012 i686 i686 i386 GNU/Linux
[root@redmine ~]# cat /etc/redhat-release
CentOS release 6.3 (Final

Ly do:
Log file sai

[root@redmine config]# cat additional_environment.rb
# Copy this file to additional_environment.rb and add any statements
# that need to be passed to the Rails::Initializer. `config` is
# available in this context.
#
# Example:
#
# config.log_level = :debug
# ...
#

# This won't work
#Logger.new(PATH,NUM_FILES_TO_ROTATE,FILE_SIZE)
#config.logger = Logger.new(config.log_path, 2, 1000000)
#config.logger.level = Logger::INFO

--
Best Regards,
Nguyen Hung Vu [aka: NVH] ( in Vietnamese: Nguyễn Vũ Hưng )
vuhung16plus{remove}@gmail.dot.com , YIM: vuhung16 , Skype:
vuhung16plus, twitter: vuhung, MSN: vuhung16.
http://www.facebook.com/nguyenvuhung
Nguyễn Vũ Hưng's blog on Free and Open Source:
http://nguyenvuhungvietnam.wordpress.com/
Học tiếng Nhật: http://hoc-tiengnhat.blogspot.com/
Vietnamese LibreOffice: http://libo-vi.blogspot.com/
Mozilla & Firefox tiếng Việt: http://mozilla-vi.blogspot.com/

Disclaimer: When posted to social networking groups include, but not limited Linux Users' Groups,
Free and Open Sources forums, mailing lists, the above is my personal opinion and is *not*
the opinion of my employer(s), associations and/or groups I join.

No comments: