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 `’
from /var/www/redmine-2.0/config/application.rb:13:in `’ from /var/www/redmine-2.0/config/application.rb:12:in `’
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 ‘
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 `’ from script/rails:6:in `require’
from script/rails:6:in `’
[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

Advertisements

Trả lời

Mời bạn điền thông tin vào ô dưới đây hoặc kích vào một biểu tượng để đăng nhập:

WordPress.com Logo

Bạn đang bình luận bằng tài khoản WordPress.com Đăng xuất / Thay đổi )

Twitter picture

Bạn đang bình luận bằng tài khoản Twitter Đăng xuất / Thay đổi )

Facebook photo

Bạn đang bình luận bằng tài khoản Facebook Đăng xuất / Thay đổi )

Google+ photo

Bạn đang bình luận bằng tài khoản Google+ Đăng xuất / Thay đổi )

Connecting to %s