I don't know what I did wrong. I try to run 'rails c,' but it just gives me an error. It was working 10 minutes ago. :\
C:/Ruby192/lib/ruby/1.9.1/psych.rb:148:in `parse': couldn't parse YAML at line 2
column 12 (Psych::SyntaxError)
from C:/Ruby192/lib/ruby/1.9.1/psych.rb:148:in `parse_stream'
from C:/Ruby192/lib/ruby/1.9.1/psych.rb:119:in `parse'
from C:/Ruby192/lib/ruby/1.9.1/psych.rb:106:in `load'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/applic
ation/configuration.rb:88:in `database_configuration'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_r
ecord/railtie.rb:58:in `block (2 levels) in <class:Railtie>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_
support/lazy_load_hooks.rb:36:in `instance_eval'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_
support/lazy_load_hooks.rb:36:in `execute_hook'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_
support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_
support/lazy_load_hooks.rb:42:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_
support/lazy_load_hooks.rb:42:in `run_load_hooks'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_r
ecord/base.rb:1904:in `<top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_r
ecord/railtie.rb:32:in `block in <class:Railtie>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/railti
e.rb:180:in `call'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/railti
e.rb:180:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/railti
e.rb:180:in `load_console'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/applic
ation.rb:154:in `block in load_console'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/applic
ation/railties.rb:11:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/applic
ation/railties.rb:11:in `all'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/applic
ation.rb:154:in `load_console'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/comman
ds/console.rb:26:in `start'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/comman
ds/console.rb:8:in `start'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/comman
ds.rb:23:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Try adding this at the beginning of config/boot.rb
require 'yaml'
YAML::ENGINE.yamler= 'syck'
Just for the record, YAML doesn't accept tabs as indentation, they must be spaces. Changing tabs to spaces solved it for me ^^
The stack dump mentions database_configuration, so I'd start with your database.yml file.
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/application/configuration.rb:88:in `database_configuration'
"Couldn't parse Yaml" Go to your project and see near the project name there is a ! sign.open it and see in which file conflict occurred.right click that file,select Replace with then Latest from Repository.Do this for all the files u changed code.then run the server it will work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With