summaryrefslogtreecommitdiffstats
path: root/config/environment.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-02-10 13:08:53 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-02-10 13:08:53 +0000
commita2c362a88dde96d7932b59f8c63b632ef525f1fb (patch)
tree69b58b1d6b7086c998bcf5087301d5df46e74587 /config/environment.rb
parent4d5d51e322401ce87301790df4ae720195569874 (diff)
downloadredmine-a2c362a88dde96d7932b59f8c63b632ef525f1fb.tar.gz
redmine-a2c362a88dde96d7932b59f8c63b632ef525f1fb.zip
Ruby1.9: move setting Encoding.default_external after boot (#4050, #4796)
"ruby test/functional/repositories_git_controller_test.rb" fails on Japanese Windows and Mingw Ruby 1.9.3p0 because "Rails" is not defined. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8833 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config/environment.rb')
-rw-r--r--config/environment.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/config/environment.rb b/config/environment.rb
index 84178eab6..27f6972ea 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -7,13 +7,13 @@
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.14' unless defined? RAILS_GEM_VERSION
+# Bootstrap the Rails environment, frameworks, and default configuration
+require File.join(File.dirname(__FILE__), 'boot')
+
if RUBY_VERSION >= '1.9' && defined?(Rails) && Rails::VERSION::MAJOR < 3
Encoding.default_external = 'UTF-8'
end
-# Bootstrap the Rails environment, frameworks, and default configuration
-require File.join(File.dirname(__FILE__), 'boot')
-
# Load Engine plugin if available
begin
require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/boot')