francesc/translate_routes — Issue #3: wrong argument type nil (expected Regexp)
Author: ephracis
Created: 2011-11-21 16:04:57+00:00
State: open

running rake routes after adding this line:
ActionDispatch::Routing::Translator.translate_from_file('config','i18n-routes.yml')

Using the same routes.rb and i18n-routes.yml files as in the README yields the following on Rails 3.1:

** Invoke routes (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
wrong argument type nil (expected Regexp)
/usr/lib/ruby/gems/1.8/gems/translate_routes-3.0.3/lib/route_translator.rb:223:in `gsub'
/usr/lib/ruby/gems/1.8/gems/translate_routes-3.0.3/lib/route_translator.rb:223:in `translate_path'
/usr/lib/ruby/gems/1.8/gems/translate_routes-3.0.3/lib/route_translator.rb:206:in `translate_route'
/usr/lib/ruby/gems/1.8/gems/translate_routes-3.0.3/lib/route_translator.rb:200:in `translations_for'
/usr/lib/ruby/gems/1.8/gems/translate_routes-3.0.3/lib/route_translator.rb:199:in `map'
/usr/lib/ruby/gems/1.8/gems/translate_routes-3.0.3/lib/route_translator.rb:199:in `translations_for'
/usr/lib/ruby/gems/1.8/gems/translate_routes-3.0.3/lib/route_translator.rb:159:in `translate'
/usr/lib/ruby/gems/1.8/gems/translate_routes-3.0.3/lib/route_translator.rb:158:in `each'
/usr/lib/ruby/gems/1.8/gems/translate_routes-3.0.3/lib/route_translator.rb:158:in `translate'
/usr/lib/ruby/gems/1.8/gems/translate_routes-3.0.3/lib/route_translator.rb:277:in `translate_from_file'
/var/rails/stoffi/v6/config/routes.rb:142
/usr/lib/ruby/gems/1.8/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:234:in `load'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:234:in `load'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:234:in `load'
/usr/lib/ruby/gems/1.8/gems/railties-3.1.1/lib/rails/application/routes_reloader.rb:29:in `load_paths'
/usr/lib/ruby/gems/1.8/gems/railties-3.1.1/lib/rails/application/routes_reloader.rb:29:in `each'
/usr/lib/ruby/gems/1.8/gems/railties-3.1.1/lib/rails/application/routes_reloader.rb:29:in `load_paths'
/usr/lib/ruby/gems/1.8/gems/railties-3.1.1/lib/rails/application/routes_reloader.rb:13:in `reload!'
/usr/lib/ruby/gems/1.8/gems/railties-3.1.1/lib/rails/application/routes_reloader.rb:7:in `initialize'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.1.1/lib/active_support/file_update_checker.rb:32:in `call'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.1.1/lib/active_support/file_update_checker.rb:32:in `execute_if_updated'
/usr/lib/ruby/gems/1.8/gems/railties-3.1.1/lib/rails/application/finisher.rb:63
/usr/lib/ruby/gems/1.8/gems/railties-3.1.1/lib/rails/application/finisher.rb:64:in `call'
/usr/lib/ruby/gems/1.8/gems/railties-3.1.1/lib/rails/application/finisher.rb:64
/usr/lib/ruby/gems/1.8/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `instance_exec'
/usr/lib/ruby/gems/1.8/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `run'
/usr/lib/ruby/gems/1.8/gems/railties-3.1.1/lib/rails/initializable.rb:55:in `run_initializers'
/usr/lib/ruby/gems/1.8/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `each'
/usr/lib/ruby/gems/1.8/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `run_initializers'
/usr/lib/ruby/gems/1.8/gems/railties-3.1.1/lib/rails/application.rb:96:in `initialize!'
/usr/lib/ruby/gems/1.8/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in `send'
/usr/lib/ruby/gems/1.8/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
/var/rails/stoffi/v6/config/environment.rb:7
/usr/lib/ruby/gems/1.8/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
/usr/lib/ruby/gems/1.8/gems/railties-3.1.1/lib/rails/application.rb:83:in `require_environment!'
/usr/lib/ruby/gems/1.8/gems/railties-3.1.1/lib/rails/application.rb:193:in `initialize_tasks'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/usr/local/bin/rake:32
Tasks: TOP => routes => environment