# Argument Error

**URL:** <https://www.ruby-forum.com/t/argument-error/165408>\
**Category:** Rails I18n\
**Created:** [April 13, 2009, 7:00pm UTC](https://www.ruby-forum.com/t/argument-error/165408 "2009-04-13T19:00:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![antonk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a5b964/32.png) [@antonk](https://www.ruby-forum.com/u/antonk)\
**Post date:** [April 13, 2009, 7:00pm UTC](https://www.ruby-forum.com/t/argument-error/165408/1 "2009-04-13T19:00:43Z")

</div>

I used this guide: [Rails Internationalization (I18n) API — Ruby on Rails Guides](http://guides.rubyonrails.org/i18n.html) to localize my  
sample application

i’ve set config/environment.rb, controllers/application.rb as it is  
written in the article

#views/home/index.html.erb

# \<%=t :hello\_world %\>

but when I start application the following error occurs:

ArgumentError in Home#index  
Showing app/views/home/index.html.erb where line #1 raised:

How to avoid this error?

I’m using Mongrel/Apache and my rails configuration is:

Ruby version 1.8.6 (i386-mswin32)  
RubyGems version 1.3.1  
Rails version 2.2.2  
Active Record version 2.2.2  
Action Pack version 2.2.2  
Active Resource version 2.2.2  
Action Mailer version 2.2.2  
Active Support version 2.2.2

Please, help me 🙂

---

<div class="post-metadata">

**Author:** ![antonk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a5b964/32.png) [@antonk](https://www.ruby-forum.com/u/antonk)\
**Post date:** [April 13, 2009, 7:03pm UTC](https://www.ruby-forum.com/t/argument-error/165408/2 "2009-04-13T19:03:53Z")

</div>

I forgot to say:  
#config/locales/en.yml  
en:  
hello\_world: “Hello world”

#config/locales/es.yml  
es:  
hello\_world: “Hola Mundo”

ArgumentError in Home#index

Showing app/views/home/index.html.erb where line #1 raised:

syntax error on line 1, col 13: ` hello\_world: “Hola Mundo”’  
Extracted source (around line #1):

1:

# \<%=t :hello\_world %\>
  
RAILS\_ROOT: C:/ir/rails\_apps/new

C:/ir/ruby/lib/ruby/1.8/yaml.rb:133:in `load' C:/ir/ruby/lib/ruby/1.8/yaml.rb:133:in`load’  
C:/ir/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active\_support/vendor/i18n-0.0.1/i18n/backend/simple.rb:191:in  
`load_yml' C:/ir/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/backend/simple.rb:178:in`send’  
C:/ir/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active\_support/vendor/i18n-0.0.1/i18n/backend/simple.rb:178:in  
`load_file' C:/ir/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/backend/simple.rb:13:in`load\_translations’  
C:/ir/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active\_support/vendor/i18n-0.0.1/i18n/backend/simple.rb:13:in  
`each' C:/ir/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/backend/simple.rb:13:in`load\_translations’  
C:/ir/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active\_support/vendor/i18n-0.0.1/i18n/backend/simple.rb:79:in  
`init_translations' C:/ir/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/backend/simple.rb:94:in`lookup’  
C:/ir/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active\_support/vendor/i18n-0.0.1/i18n/backend/simple.rb:33:in  
`translate' C:/ir/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n.rb:160:in`translate’  
C:/ir/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_view/helpers/translation\_helper.rb:8:in  
`t’  
app/views/home/index.html.erb:1
