[NEW TO RoR] - Error on Rake DB:Create

Hello there,

this is my first post and I'm new to Ruby on Rails.

I'm getting the following error when I do "rake db:create" :

(in /home/nelson/rubyapps/blog) rake aborted! syntax error on line 24, col 1: ` socket : /var/run/mysqld/ mysqld.sock'

Now the background:

I installed Ubuntu Karmic Koala 9.10 in a Sun VirtualBox virtual machine running in a Windows XP host

Following Ubuntu installation I followed this guide : http://www.hackido.com/2009/11/install-ruby-on-rails-on-ubuntu-karmic.html

until STEP 6 , included, to have RoR installed on the Ubuntu box

In step 1 I set my locale to pt-PT (I'm from Portugal) using

sudo locale-gen pt_PT.UTF-8 and sudo /usr/sbin/update-locale LANG=pt_PT.UTF-8

Next I followed this guide:

to have RoR installed to a mysql database

When I get to step 3.4 Creating the Database I get the error displayed above.

Note : I have a password defined in the database.yml file for the DEVELOPMENT area, that reads as :

development: adapter : mysql enconding : utf8 reconnect : false database : blog_development pool : 5 username : root password : <mypassword, same when installed mysql> socket : /var/run/mysqld/mysqld.sock

The only thing I changed in this file was the password.

Any clue on why I get this error?

Thanks in advance, Nelson

once remove the line socket : /var/run/mysqld/mysqld.sock i am not sure but it may works…

I can recreate this in irb:

require 'YAML'; YAML.load('foo: bar') #=> { 'foo' => 'bar' }

YAML.load(" foo: bar\n\tbaz: woot") # => ArgumentError: syntax error on line 1, col 0: ` baz: woot'

It's caused by mixing tabs and spaces in a YAML file, which is forbidden.

--Matt Jones