-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Character set conversion #4
Comments
I'm setting up some tests at the moment, but everything I am trying is just working fine in UTF8. Can you try it with Otherwise, I can't reproduce it and that'll make it much harder to help fix. |
Here's an output from rake --trace. I think I mentioned this, but in case I --Todd /home/todd/.rvm/rubies/ruby-1.9.2-p290/bin/ruby -e Tasks: TOP => site:backup => site:backup:_save_db_to_yml Process finished with exit code 1 On Tue, Aug 9, 2011 at 7:06 AM, soundevolution <
############################################ |
I see I didn't ask your second question. Not being character set savvy, I'm not sure how to figure out where the Ascii 8 bit string is coming from. Is there a query I can run on the DB? I could perhaps do mysqldump and send that. Would that provide a clue? |
The stack trace helps. I can see it's happening in the yaml export in ruby 1.9.2. Admittedly, I'd only tested on 1.8.7 since the rails apps I've used all used that. It's easy to repro on ruby 1.9.2 with rails 3, and I'm taking a look into it. |
Ruby 1.9.2 definitely treats YML files very differently to 1.8.7. I have a solution not too far away... |
After chasing my tail round in circles, I undid a whole bunch of my changes, and then with only some minor changes, couldn't reproduce the issue in 1.9.2. I've updated version 0.0.9 with these minimal changes. Let me know if this helps or not... |
I think that this does solve the problem -- but can't completely verify it because I'm running into potentially another issue (remember I'm a noob at Ruby): It fails to create the tar file because files_to_archive is empty in save_db_to_yml. On my system, the culprit appears to be add_to_archive which only adds something to list if it starts with RAILS_ROOT (which I think is deprecate in 3.1). The string being passed in is "db/schema.rb" and "db/backup", neither of which starts with RAILS_ROOT. I added an: else
@files_to_archive << path to add_to_archive and that seems to have fixed the problem. Thoughts? The tar file does look correct, but I haven't had time to try a restore yet. |
When I tried it in a Ubuntu environment (admittedly hosted via VirtualBox in Windows 7 64-bit), I got::
rake aborted!
“\xE2″ from ASCII-8BIT to UTF-8
I looked at my database.yml and they’re set to utf8 and the collation on the database tables is “utf8_unicode_ci.” Mysql is running in the Ubuntu machine.
The text was updated successfully, but these errors were encountered: