# New problem with Mac OS X + rails + mysql. Please help!

**URL:** <https://www.ruby-forum.com/t/new-problem-with-mac-os-x-rails-mysql-please-help/52444>\
**Category:** Rails\
**Created:** [January 14, 2006, 7:42am UTC](https://www.ruby-forum.com/t/new-problem-with-mac-os-x-rails-mysql-please-help/52444 "2006-01-14T07:42:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kavika\_V](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/5f8ce5/32.png) [@Kavika\_V](https://www.ruby-forum.com/u/Kavika_V)\
**Post date:** [January 14, 2006, 7:42am UTC](https://www.ruby-forum.com/t/new-problem-with-mac-os-x-rails-mysql-please-help/52444/1 "2006-01-14T07:42:22Z")

</div>

All,  
I am working through the ‘depot’ sample application from the  
“Pragmatic Programmers” book on my  
powerbook. I was going through the install process on  
[Dan Benjamin](http://hivelogic.com/articles/2005/12/01/)  
ruby\_rails\_lighttpd\_mysql\_tiger and it seemed to work fine.  
But when I try to create the first table, I get the following error,  
and I have no idea what this means.  
Any help would be greatly appreciated!  
Thanks

(My database.yml file looks like this:  
development:  
adapter: mysql  
database: depot\_development  
host: localhost  
username: root  
password:

=====================  
error:  
mycomputer:~/Rails/depot dvollmar$ ruby script/generate scaffold Product  
Admin  
/usr/lib/ruby/1.8/yaml.rb:119:in `load': parse error on line 11, col 11: ` username: root’ (ArgumentError)  
from /usr/lib/ruby/1.8/yaml.rb:119:in `load’  
… lines deleted)

```
    from /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/

```

active\_support/dependencies.rb:  
214:in `require’  
from script/generate:3

---

<div class="post-metadata">

**Author:** ![Kavika\_V](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/5f8ce5/32.png) [@Kavika\_V](https://www.ruby-forum.com/u/Kavika_V)\
**Post date:** [January 14, 2006, 7:58am UTC](https://www.ruby-forum.com/t/new-problem-with-mac-os-x-rails-mysql-please-help/52444/2 "2006-01-14T07:58:37Z")

</div>

Kavika V. \<kavika@…\> writes:

BTW: This happens when I try to start the server:  
David-Vollmars-Computer:~/Rails/depot dvollmar$ ruby script/server  
=\> Booting WEBrick…  
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active\_record/  
connection\_adapters/abstract/connection\_specification.rb:73:in  
`establish\_connection’: development database is not configured  
(ActiveRecord::AdapterNotSpecified)  
from  
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active\_record/  
…  
(Using database.yml:  
development:  
adapter: mysql  
database: depot\_development  
username: root  
password: \<MY\_SQL\_PASSWORT\>  
host: localhost  
port: 3306

---

<div class="post-metadata">

**Author:** ![Kavika\_V](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/5f8ce5/32.png) [@Kavika\_V](https://www.ruby-forum.com/u/Kavika_V)\
**Post date:** [January 14, 2006, 4:18pm UTC](https://www.ruby-forum.com/t/new-problem-with-mac-os-x-rails-mysql-please-help/52444/3 "2006-01-14T16:18:16Z")

</div>

Could you have a tab before the “username: root” in your YAML file? I  
believe you can’t use tags, just spaces. Note the error message has  
whitespace between ’ and username.

HTH,  
Dean

On 1/14/06, Kavika V. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> mycomputer:~/Rails/depot dvollmar$ ruby script/generate scaffold Product Admin
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–  
Dean W.  
[http://www.aspectprogramming.com](http://www.aspectprogramming.com)  
[http://www.newaspects.com](http://www.newaspects.com)  
[http://www.contract4j.org](http://www.contract4j.org)

---

<div class="post-metadata">

**Author:** ![Kavika\_V](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/5f8ce5/32.png) [@Kavika\_V](https://www.ruby-forum.com/u/Kavika_V)\
**Post date:** [January 14, 2006, 5:53pm UTC](https://www.ruby-forum.com/t/new-problem-with-mac-os-x-rails-mysql-please-help/52444/4 "2006-01-14T17:53:18Z")

</div>

Thanks! Indeed removing tabs made that problem go away. Now I get t  
the following error when starting webrick or trying to create the  
tables.

## database.yml

development:  
adapter: mysql  
database: depot\_development  
username: root  
password: \<MY\_PASSWORD\>  
host: localhost  
port: 3306

## error

## David-Vollmars-Computer:~/Rails/depot dvollmar$ ruby script/server =\> Booting WEBrick… /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active\_record/ connection\_adapters/abstract/connection\_specification.rb:73:in `establish_connection': development database is not configured (ActiveRecord::AdapterNotSpecified) from /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:66:in`establish\_connection’

I am a little bit confused about the ‘socket’ value that shows up in the  
default database.yml file.  
What should that be? I can not find any explanation for this anywhere.

Thanks!

---

<div class="post-metadata">

**Author:** ![Kavika\_V](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/5f8ce5/32.png) [@Kavika\_V](https://www.ruby-forum.com/u/Kavika_V)\
**Post date:** [January 14, 2006, 6:42pm UTC](https://www.ruby-forum.com/t/new-problem-with-mac-os-x-rails-mysql-please-help/52444/5 "2006-01-14T18:42:33Z")

</div>

Ezra Z. \<ezra@…\> writes:  
…

> WebMaster  
> Yakima Herald-Republic Newspaper  
> ezra@…  
> 509-577-7732

Thanks, I fixed that, now I am getting the dreaded error:  
development database is not configured  
(ActiveRecord::AdapterNotSpecified)

???

---

<div class="post-metadata">

**Author:** ![Kavika\_V](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/5f8ce5/32.png) [@Kavika\_V](https://www.ruby-forum.com/u/Kavika_V)\
**Post date:** [January 14, 2006, 6:02pm UTC](https://www.ruby-forum.com/t/new-problem-with-mac-os-x-rails-mysql-please-help/52444/6 "2006-01-14T18:02:26Z")

</div>

On Jan 13, 2006, at 10:32 PM, Kavika V. wrote:

> mycomputer:~/Rails/depot dvollmar$ ruby script/generate scaffold  
> Product Admin  
> /usr/lib/ruby/1.8/yaml.rb:119:in `load': parse error on line 11, col 11:` username: root’ (ArgumentError)  
> from /usr/lib/ruby/1.8/yaml.rb:119:in `load’  
> … lines deleted)
> 
> ```
> from /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/
> 
> ```
> 
> active\_support/dependencies.rb:  
> 214:in `require’  
> from script/generate:3

Kavika-

```
You have some tab chars in your database.yml. YAML cannot have any

```

tabs in it. I can see tabs between host: and locathost. Go through  
your whole database.yml and get rid of all tabs and extra spaces and  
you will be fine.

Cheers-  
-Ezra Z.  
WebMaster  
Yakima Herald-Republic Newspaper  
removed\_email\_address@domain.invalid  
509-577-7732
