Hi,
I am getting started with globalize and so far it works ok. At some
point I had to do ‘rake globalize:teardown’ to reset the database (I had
the problem where all user translations were stored as ‘built_in’ as
described on the ‘example application’ pag). Now when I run ‘rake
globalize:setup’ again I got the following error:
rake aborted!
Mysql::Error: #42S02Table ‘globalize_development.globalize_languages’
doesn’t exist: SHOW FIELDS FROM globalize_languages
and I thought: of course it doesn’t exist - I just deleted it!
I am actually getting the same error now when trying to run any
migration!
Thanks for any hint how to fix this!
Ingo
The problem occurs when you require Globalize and then do anything
with Locale.set in your rails environment. Whenever rake tasks run,
it loads the entire environment.
I ended up using the following code (in environment.rb) so that I
could teardown and setup and use capistrano to manage my app:
require globalize plugin and set default locale to us english
include Globalize
begin
Locale.set_base_language AppConstants::DEFAULT_LOCALE
Locale.set AppConstants::DEFAULT_LOCALE
rescue
puts “** Warning: Install Globalize plugin first and setup using
rake globalize:setup”
end
Hope this helps,
–
Charles Brian Q.
self-promotion: www.seebq.com
highgroove studios: www.highgroove.com
slingshot hosting: www.slingshothosting.com
Ruby on Rails Bootcamp at the Big Nerd Ranch
Intensive Ruby on Rails Training:
http://www.bignerdranch.com/classes/ruby.shtml