Other people have had problem with yml files since they ARE tab- and
space-sensitive. Make sure you’re editing them in a text-safe
environment and that there’s no cross-OS problems. Also, you can try
doing a SVN revert on that yml file and make sure you don’t mess with
the spacing or tabs.
If others run into this problem, I found a problem in mine that is
related to this solution from Ruben. When I put my actual password in
the .yml file, I must have misfired when I went for the space key before
the password, so I had something like this:
production:
adapter: mysql
database: cr_radiant_live
username: user
password:notmyrealpassword
just adding the space between password: and notmyrealpassword was all
it took to get things rolling.
I knwo this is an old post but since I found it when i searched for my
problem in google I thought i would tell you what I found so if anyone
is looking for a solution to this they would find it as well. Its the
only way I can give back right now since I am still new to rails.
In my mongrel_cluster file I added an option:
set :mongrel_clean, true
as per the manual I was working through. My app wouldnt start so I
looked through the file and checked each item and after fiddling I found
the corect way to write this was:
set: mongrel_clean, true
You will notice the spaces where in the wrong place. The space was
before the : and not after and thus this option was not working
correctly. So, if you get the error:
/usr/lib/ruby/1.8/yaml.rb:133:in load': syntax error on line 9, col -1:’ (ArgumentError)
or something similar, where it states syntax error on line 9 is the line
that has the problem in my config/mongrel_cluster.yml file. in my case
line 9 had the above set: item on it and was needed to be changed.
I knwo this is an old post but since I found it when i searched for my
problem in google I thought i would tell you what I found so if anyone
is looking for a solution to this they would find it as well. Its the
only way I can give back right now since I am still new to rails.
In my mongrel_cluster file I added an option:
set :mongrel_clean, true
as per the manual I was working through. My app wouldnt start so I
looked through the file and checked each item and after fiddling I found
the corect way to write this was:
set: mongrel_clean, true
You will notice the spaces where in the wrong place. The space was
before the : and not after and thus this option was not working
correctly. So, if you get the error:
/usr/lib/ruby/1.8/yaml.rb:133:in load': syntax error on line 9, col -1:’ (ArgumentError)
or something similar, where it states syntax error on line 9 is the line
that has the problem in my config/mongrel_cluster.yml file. in my case
line 9 had the above set: item on it and was needed to be changed.
Good luck in figuring things out.
Gigg
For me, I got this error when I was manually writing out my YAML file.
I had the following line when it gave the “col -1” error.
blahblah: [8] Some String
Yaml didn’t like it, so I had to manually encode the square brackets
(and then decode it when reading it into my app)
blahblah: <left_bracket/>8<right_bracket/> Game Title