diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-12-17 08:34:29 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-12-17 08:34:29 +0000 |
commit | 3c1576e364c911e38f7c002582fc794f16ca87dd (patch) | |
tree | 67d133d06c15364e17cd48b4fb4f4cebf139d127 /config/boot.rb | |
parent | 9f18426ca7b1e798ffd763382721660c674d2043 (diff) | |
download | redmine-3c1576e364c911e38f7c002582fc794f16ca87dd.tar.gz redmine-3c1576e364c911e38f7c002582fc794f16ca87dd.zip |
Manually require i18n 0.4.2 before Rails tries to load the most recent gem (#7013).
This workaround makes Redmine work even if i18n 0.5.0 gem is installed.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4516 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config/boot.rb')
-rw-r--r-- | config/boot.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/config/boot.rb b/config/boot.rb index dd5e3b691..95bd6b885 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -106,5 +106,17 @@ module Rails end end +# TODO: Workaround for #7013 to be removed for 1.2.0 +# Loads i18n 0.4.2 before Rails loads any more recent gem +# 0.5.0 is not compatible with the old interpolation syntax +# Plugins will have to migrate to the new syntax for 1.2.0 +require 'rubygems' +begin + gem 'i18n', '0.4.2' +rescue Gem::LoadError => load_error + $stderr.puts %(Missing the i18n 0.4.2 gem. Please `gem install -v=0.4.2 i18n`) + exit 1 +end + # All that for this: Rails.boot! |