It does not work with either version of the i18n gem.
Any help to get the i18n gem work on rails 2.3.4 is highly
appreciated.
Kind regards,
Juergen
Installation on Rails < 2.3.5 (deprecated)
Up to version 2.3.4 Rails will not accept i18n gems > 0.1.3. There is
an unpacked
gem inside of active_support/lib/vendor which gets loaded unless gem
‘i18n’, ‘~> 0.1.3’.
This requirement is relaxed in 6da03653
The new i18n gem can be loaded from vendor/plugins like this:
def reload_i18n! raise “Move to i18n version 0.2.0 or greater” if
Rails.version > “2.3.4” $:.grep(/i18n/).each { |path|
$:.delete(path) } I18n::Backend.send :remove_const, “Simple” $: <<
Rails.root.join(‘vendor’, ‘plugins’, ‘i18n’, ‘lib’).to_s end
Then you can reload_i18n! inside an i18n initializer.
I’m not sure how this has made it into the readme, but … it might be
easier for you to just patch Rails here. You could just freeze Rails to
vendor/rails and apply some patch that changes these lines:
to match these:
After that Rails should pick up whatever I18n gem version you’ve
installed as long as it’s >= 0.1.3
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.