Undefined method i18n

I have tried to boot WEBrick, though I suffered the problem like i18n
method not found.
How can I recover from this problem?

$ ruby script/server
=> Booting WEBrick…
/home/user/ror/design_qr/config/environment.rb:56: undefined method
i18n' for #<Rails::Configuration:0xb77ce3ec> (NoMethodError) from ./script/../config/../vendor/rails/railties/lib/initializer.rb:91:inrun’
from /home/user/ror/design_qr/config/environment.rb:19
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
from
/home/user/ror/design_qr/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in
require' from /home/user/ror/design_qr/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:innew_constants_in’
from
/home/user/ror/design_qr/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in
require' from /home/user/ror/design_qr/vendor/rails/railties/lib/commands/servers/webrick.rb:59 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require’
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
require' from /home/user/ror/design_qr/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:inrequire’
from
/home/user/ror/design_qr/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:in
new_constants_in' from /home/user/ror/design_qr/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:inrequire’
from
/home/user/ror/design_qr/vendor/rails/railties/lib/commands/server.rb:39
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
from script/server:3

Hope it would be your help to understand the problem.

$ gem list

*** LOCAL GEMS ***

actionmailer (2.2.3)
actionpack (2.2.3)
activerecord (2.2.3)
activeresource (2.2.3)
activesupport (2.2.3)
amatsuda-i18n_generators (0.6.0)
gettext (2.1.0)
i18n (0.3.7)
locale (2.0.5)
rails (2.2.3)
rake (0.8.7)

thanks

The first “i” is uppercase => I18n.t(‘your.traduction’)

2010/5/5 Akira Y. [email protected]

Andrés Gutiérrez wrote:

The first “i” is uppercase => I18n.t(‘your.traduction’)

2010/5/5 Akira Y. [email protected]

Thank you for your comment.
I have changed from “i18n” to “I18n” but the problem is still remaining.
the problem happens on the following line.

The internationalization framework can be changed to have another

default locale (standard is :en) or more load paths.

All files from config/locales/*.rb,yml are added automatically.

config.i18n.load_path << Dir[File.join(RAILS_ROOT, ‘my’, ‘locales’,

‘*.{rb,yml}’)]
config.i18n.default_locale = :ja

Can you give me another solution?

Thanks

On May 6, 2010, at 9:40 AM, Akira Y. wrote:

The internationalization framework can be changed to have another

default locale (standard is :en) or more load paths.

All files from config/locales/*.rb,yml are added automatically.

config.i18n.load_path << Dir[File.join(RAILS_ROOT, ‘my’, ‘locales’,

‘*.{rb,yml}’)]
config.i18n.default_locale = :ja

This is part of your config/environment.rb file and the config object
here is the Rails::Configuration.

If the Rails::Configuration object does not respond to :i18n (as the
error trace suggests that you’ve posted) then by any chance are you
trying to run an existing Rails application with an outdated Rails
version (such as Rails < 2.1)?