December 6th, 2009, 03:01 AM
-
Rails MySQL and mongrel problem
After creating a project like
rails -d mysql hello4
and then starting the server as in
ruby script/server
mongrel trys to start, but then fails. I have pasted the error below. I was wondering if anyone knows what this means and how to fix it. I believe it is involved with the databases, but I am unsure exactly how to fix this.
error:
=> Booting Mongrel
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
c:/ruby/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 24, col 2: ` h
ost: localhost' (ArgumentError)
from c:/ruby/lib/ruby/1.8/yaml.rb:133:in `load'
from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:902:i
n `database_configuration'
from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:437:i
n `initialize_database'
from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:141:i
n `process'
from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:i
n `send'
from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:i
n `run'
from D:/My Documents/Rails_Projects/hello4/config/environment.rb:9
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
m_original_require'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
quire'
from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_suppo
rt/dependencies.rb:156:in `require'
from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_suppo
rt/dependencies.rb:521:in `new_constants_in'
from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_suppo
rt/dependencies.rb:156:in `require'
from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:8
4
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
m_original_require'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
quire'
from script/server:3
December 7th, 2009, 03:53 PM
-
Okay, I figured it out. In the database.yml file, password
assword has to have a space after the : and cannot contain punctuation characters as the first character.