I am running a site in development where I have set the appropriate locale
(to norwegian, :nb), and everything is working fine. I can also switch
between different locales without a problem. However, I am experiencing
problems controlling the locale - now that I am deploying the site to a
server hosted by my customer. At this location they already have an old
version of this site (my first version, running a hobo-site that is almost
at hobo-1.0). The old app is btw running fine with the :nb locale (in
production). The site is set up using nginx, passenger and ruby-ee.
For testing the latest commits I have created an "edge"-environment that I
am deploying to. The new site is also running on the same setup as above,
except this time it is using rails 3, bundler and Gemfile to specify the
rails3/Hobo1.3 environment - and it is also using another port to target the
site. Everything seems to work out as expected, except *one strange thing*:
The site uses :en for the locale, even though I am very certain that it is
set up correctly. I have added an initializer that writes the locale to the
log during startup to confirm that I have :nb set up - the output claims
that :nb is set - as expected. I have in addition to this also started the
Rails console in "edge" environment (RAILS_ENV=edge rails c), and this is
what it yields:
ree-1.8.7-2010.02 :005 > DJBM2::Application.config.i18n.default_locale
=> :nb
I also did the following, confirming that my locale-files are available:
ree-1.8.7-2010.02 :008 > pp DJBM2::Application.config.i18n
{[:railties_load_path,
["/var/www/djbm2-edge/releases/20110614183129/config/locales/hobo.nb.yml",
"/var/www/djbm2-edge/releases/20110614183129/config/locales/nb.yml",
"/var/www/djbm2-edge/releases/20110614183129/config/locales/en.yml",
"/var/www/djbm2-edge/releases/20110614183129/config/locales/app.nb.yml",
"/var/www/djbm2-edge/releases/20110614183129/config/locales/hobo.en.yml",
"/var/www/djbm2-edge/releases/20110614183129/config/locales/app.en.yml"]]=>
nil,
[:load_path,
["/var/www/djbm2-edge/releases/20110614183129/config/locales/hobo.nb.yml",
"/var/www/djbm2-edge/releases/20110614183129/config/locales/nb.yml",
"/var/www/djbm2-edge/releases/20110614183129/config/locales/en.yml",
"/var/www/djbm2-edge/releases/20110614183129/config/locales/app.nb.yml",
"/var/www/djbm2-edge/releases/20110614183129/config/locales/hobo.en.yml",
"/var/www/djbm2-edge/releases/20110614183129/config/locales/app.en.yml"]]=>
nil,
[:default_locale, :nb]=>nil}
=> nil
I am totally unable to find out where the locale gets changed back to :en
during requests. Could there perhaps be issues with using a custom
environment name ("edge")?
Any help appreciated, thanks,
Ronny
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/hobousers/-/_bv5H2f-QOoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.