# Depot example problem on Slackware

**URL:** <https://www.ruby-forum.com/t/depot-example-problem-on-slackware/53225>\
**Category:** Rails\
**Created:** [January 29, 2006, 8:49pm UTC](https://www.ruby-forum.com/t/depot-example-problem-on-slackware/53225 "2006-01-29T20:49:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ldt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c0e974/32.png) [@ldt](https://www.ruby-forum.com/u/ldt)\
**Post date:** [January 29, 2006, 8:49pm UTC](https://www.ruby-forum.com/t/depot-example-problem-on-slackware/53225/1 "2006-01-29T20:49:07Z")

</div>

Hello.  
I’m new to RoR. I run RoR on my Slackware. I follow the depot example  
and have a problem when run the script:

root@localhost:~/work/depot# ruby script/generate scaffold Admin Product  
/usr/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 5, col 2:` socket:/var/run/mysql/mysql.sock’ (ArgumentError)  
from /usr/lib/ruby/1.8/yaml.rb:133:in `load' from /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:424:in`database\_configuration’  
from  
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:168:in  
`initialize_database' from /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:83:in`process’  
from  
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:42:in `run' from ./script/../config/../config/environment.rb:10 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in`require’  
from  
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active\_support/dependencies.rb:214:in  
`require' from /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/commands/generate.rb:1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in`require’  
from  
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active\_support/dependencies.rb:214:in  
`require’  
from script/generate:3

I have check file socket /var/run/mysql/mysql.sock, it exists. I don’t  
know how to fix.  
what do i have to do to make it work ?

Thanks

---

<div class="post-metadata">

**Author:** ![ldt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c0e974/32.png) [@ldt](https://www.ruby-forum.com/u/ldt)\
**Post date:** [January 30, 2006, 2:43am UTC](https://www.ruby-forum.com/t/depot-example-problem-on-slackware/53225/2 "2006-01-30T02:43:25Z")

</div>

You have an error in the syntax of your database.yml file. You must  
have only spaces and no tabs are allowed in yaml. Go through your  
whole databse.yml file again and make sure there are no extra spaces  
or tabs at all and you should be ok.

Cheers-  
-Ezra

On Jan 29, 2006, at 11:49 AM, thong le duc wrote:

> ```
> from
> from ./script/../config/../config/environment.rb:10
> from
> 
> ```
> 
> –
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

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

---

<div class="post-metadata">

**Author:** ![ldt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c0e974/32.png) [@ldt](https://www.ruby-forum.com/u/ldt)\
**Post date:** [January 30, 2006, 7:54am UTC](https://www.ruby-forum.com/t/depot-example-problem-on-slackware/53225/3 "2006-01-30T07:54:50Z")

</div>

Thanks, Ezra. It’s worked.  
Actually, i have checked database.yml several times before post the  
question but i didn’t notice tabs, didn’t know that tabs aren’t allowed.

---

<div class="post-metadata">

**Author:** ![ldt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c0e974/32.png) [@ldt](https://www.ruby-forum.com/u/ldt)\
**Post date:** [January 30, 2006, 10:53am UTC](https://www.ruby-forum.com/t/depot-example-problem-on-slackware/53225/4 "2006-01-30T10:53:36Z")

</div>

Dominique P. wrote:

> Yes! the whole tab thing in the YAML should be better documented.  
> Have you _seen_ the [yaml.org](http://yaml.org) faq? 🙂

---

<div class="post-metadata">

**Author:** ![ldt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c0e974/32.png) [@ldt](https://www.ruby-forum.com/u/ldt)\
**Post date:** [February 3, 2006, 4:12pm UTC](https://www.ruby-forum.com/t/depot-example-problem-on-slackware/53225/5 "2006-02-03T16:12:35Z")

</div>

On Jan 30, 2006, at 3:54 AM, Alex Y. wrote:

> > Yes! the whole tab thing in the YAML should be better documented.  
> > Have you _seen_ the [yaml.org](http://yaml.org) faq? 🙂

I believe the point is that 99.9999% of people using database.yml  
will not have.

It happens often enough that perhaps the first line of the generated  
database.yml file for a new project should say

# IF YOU SEE STRANGE PROBLEMS WHEN STARTING YOUR APP, CHECK FOR

TABS IN THIS FILE

---

<div class="post-metadata">

**Author:** ![ldt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c0e974/32.png) [@ldt](https://www.ruby-forum.com/u/ldt)\
**Post date:** [February 3, 2006, 7:28pm UTC](https://www.ruby-forum.com/t/depot-example-problem-on-slackware/53225/6 "2006-02-03T19:28:52Z")

</div>

Yeah Dave… I asked you what would cause a syntax error in a yaml file  
after your rails  
talk at a NFJS and you said you had no idea! 😉 Sorry, couldn’t  
resist…

Really though, a default comment in the yaml generator would save lots  
of angst and  
frustration (that syntax error so took the wind out of my sails that I  
blew off rails for  
a couple weeks).

Could be even simpler than Dave’s idea: “NOTE: YAML DOES NOT ALLOW  
TABS”.

b

PS: It was a really good presentation though Dave…

---

<div class="post-metadata">

**Author:** ![ldt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c0e974/32.png) [@ldt](https://www.ruby-forum.com/u/ldt)\
**Post date:** [January 30, 2006, 10:10am UTC](https://www.ruby-forum.com/t/depot-example-problem-on-slackware/53225/7 "2006-01-30T10:10:01Z")

</div>

Yes! the whole tab thing in the YAML should be better documented.

NO TABS IN YAMLS, ONLY SPACES.

I just added this gotcha to  
[http://wiki.rubyonrails.org/rails/pages/Gotcha](http://wiki.rubyonrails.org/rails/pages/Gotcha)

Hopefully it will not strike someone again (wishful thinking)!

Maybe the next best thing to do is to run a script before starting the  
server to check for dumb things like that…

Thanks!  
Dominique

joe ld wrote:

> Thanks, Ezra. It’s worked.  
> Actually, i have checked database.yml several times before post the  
> question but i didn’t notice tabs, didn’t know that tabs aren’t allowed.
