I ran script/generate model Book and I got:
/usr/lib/ruby/1.8/yaml.rb:133:in load': syntax error on line 23, col 2:
socket: /var/run/mysqld/mysqld.sock’ (ArgumentError)
from /usr/lib/ruby/1.8/yaml.rb:133:in load' from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:819:in
database_configuration’
from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:391:in
initialize_database' from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:139:in
process’
from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in
send' from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in
run’
from /home/kedar/Projects/ror/people/config/environment.rb:13
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
require’
from
/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/generate.rb:1
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
require’
from script/generate:3
then I realized that I had mistakenly had an entry password:secret
instead of password: secret in database.yml.
Is database.yaml so sensitive to a space character? I couldn’t ascertain
it by looking at YAML Reference Card.
-Kedar