-
Notifications
You must be signed in to change notification settings - Fork 202
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
Wrongly inserting '---' characters #17
Comments
AFAICT this is a syck/psych issue. After tracking down the same problem, I found this: http://stackoverflow.com/questions/4980877/rails-error-couldnt-parse-yaml Forcing the yamler to syck works (although I consider it a temporary fix). |
It doesn't solve the problem for me. Only the entries after the first and before the second '---' are parsed! |
I just manually delete the ---'s in my yaml files. It's a bit of a hassle but i don't have to do it very often. I haven't actually tried to change the parser - but since it seems simple enough in the stackoverflow link that davelnewton posted a few weeks back I shall try it out next time i do a data dump, and if it doesn't fix the issue, I will repost. |
It'll fix the issue, but I think someone also requested a pull of the offending line--haven't noticed if it's been accepted or not. |
I 'll do the same then. First parse the yaml file to remove the ---'s, because I have a huge db. Thanx for the feedback ;) |
I'm trying to convert from SQLite3 to MySQL.
As per the instructions in the readme, I ran rake db:dump and created a data.yml file which looked like it had everything in it.
I updated my database.yml to access MySQL and created the dev and test databases.
Running rake db:load successfully created the schema in the dev database, but I received an error when the script started trying to load in the data:
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
Doing some debugging of the script revealed that data['records'] was not finding anything in the data.yml file. When I commented out the three hyphens --- after the word "records" for each table in the file, all the data was successfully loaded.
In other words, the following excerpt from my YAML file worked:
slugs:
columns:
records:
#---
Worked.
There was no binary data in my very small, non-customised refinery CMS database.
The text was updated successfully, but these errors were encountered: