Problemas con Globalize y rutas


#1

Hola,

estoy recibiendo el siguiente error cuando altero routes.rb para
integrar Globalize.

ERROR MSG —
** Starting Rails in environment development …
Exiting
./script/…/config/…/vendor/rails/activesupport/lib/active_support/dependencies.rb:267:in
load_missing_constant': uninitialized constant Locale (NameError) from ./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:453:inconst_missing’
from
./script/…/config/…/vendor/rails/activesupport/lib/active_support/dependencies.rb:465:in
const_missing' from ./script/../config/../config/routes.rb:21 from ./script/../config/../vendor/rails/actionpack/lib/action_controller/routing.rb:1126:indraw’
from ./script/…/config/…/config/routes.rb:1
from
./script/…/config/…/vendor/rails/activesupport/lib/active_support/dependencies.rb:489:in
load' from ./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:343:innew_constants_in’
from
./script/…/config/…/vendor/rails/activesupport/lib/active_support/dependencies.rb:489:in
load' ... 24 levels... from ./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:343:innew_constants_in’
from
./script/…/config/…/vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in
`require’
from
./script/…/config/…/vendor/rails/railties/lib/commands/server.rb:39
from script/server:3
FIN ERROR MSG —

En environment.rb inicializo Globalize de esta forma


include Globalize
Locale.set_base_language ‘es-ES’
LOCALES = {‘en’ => ‘en-US’}.freeze

y en routes.rb


Allow downloading Web Service WSDL as a file with an extension

instead of a file named ‘wsdl’

map.connect ‘:controller/service.wsdl’, :action => ‘wsdl’

Install the default route as the lowest priority.

map.connect ‘:language/:controller/:action/:id’, :defaults => {
:language => Locale.language ? Locale.language.code : ‘es’, :id => nil
}
map.connect ‘:controller/:action/:id.:format’
map.connect ‘:controller/:action/:id’

¿Sugerencias? ¡Gracias de antemano!


Manuel
http://linkja.com * un agregador de tendencias
http://simplelogica.net
http://simplelogica.net/logicola