views:

7

answers:

1

I'm trying to setup tolk source: http://github.com/dhh/tolk I'm at the point where I'm running: $ rake tolk:sync and $ rake tolk:import but neither will work. I get the following error ~/Rails/appname: rake tolk:sync --trace (in /Users/username/Rails/appname) ** Invoke tolk:sync (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute tolk:sync rake aborted! You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.each /Users/username/Rails/appname/vendor/plugins/tolk/lib/tolk/sync.rb:24:in flat_hash' /Users/username/Rails/appname/vendor/plugins/tolk/lib/tolk/sync.rb:14:inload_translations' /Users/username/Rails/appname/vendor/plugins/tolk/lib/tolk/sync.rb:9:in sync!' /Users/username/Rails/appname/vendor/plugins/tolk/tasks/tolk_tasks.rake:4 /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:incall' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:ineach' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:ininvoke_with_call_chain' /usr/local/lib/ruby/1.8/monitor.rb:242:in synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:ininvoke_with_call_chain' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:ininvoke_task' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:ineach' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:inrun' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:inrun' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /usr/local/bin/rake:19:in `load' /usr/local/bin/rake:19

I have a partially populated en, fr, and another misc locale file but it won't seem to import or sync. Any suggestions would be appreciated.

A: 

Prior tutorial had me creating a default locale of 'pt' corrected it:

in config/initializer/locale.rb

tell the I18n library where to find your translations

I18n.load_path += Dir[ File.join(RAILS_ROOT, 'lib', 'locale', '*.{rb,yml}') ]

you can omit this if you're happy with English as a default locale

I18n.default_locale = "pt-BR" #changed to 'en'

dah