# Scaffold macro problem

**URL:** <https://www.ruby-forum.com/t/scaffold-macro-problem/159982>\
**Category:** Rails\
**Created:** [February 10, 2009, 6:04pm UTC](https://www.ruby-forum.com/t/scaffold-macro-problem/159982 "2009-02-10T18:04:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![adeel\_1103](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/76d3ee/32.png) [@adeel\_1103](https://www.ruby-forum.com/u/adeel_1103)\
**Post date:** [February 10, 2009, 6:04pm UTC](https://www.ruby-forum.com/t/scaffold-macro-problem/159982/1 "2009-02-10T18:04:33Z")

</div>

Hello,

I am using Komodo Edit 5.0 for ROR. I have made the database by using  
the macros in it. But when I make model using sacffold, I get error. The  
details are given below:

C:/Ruby/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 22, col 2: ` password:’ (ArgumentError)  
from C:/Ruby/lib/ruby/1.8/yaml.rb:133:in `load' from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:819:in `database\_configuration’  
from  
C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:391:in  
`initialize_database' from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:139:in `process’  
from  
C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in  
`send' from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in `run’  
from E:/ror/MovieApp/config/environment.rb:13  
from C:/Ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:31:in  
`gem_original_require' from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’  
from  
C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/generate.rb:1  
from C:/Ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:31:in  
`gem_original_require' from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’  
from script/generate:3

* * *

My database.yml is given below

# MySQL. Versions 4.1 and 5.0 are recommended.

# 

# Install the MySQL driver:

# gem install mysql

# On Mac OS X:

# sudo gem install mysql – --with-mysql-dir=/usr/local/mysql

# On Mac OS X Leopard:

# sudo env ARCHFLAGS=“-arch i386” gem install mysql –

–with-mysql-config=/usr/local/mysql/bin/mysql\_config

# This sets the ARCHFLAGS environment variable to your native

architecture

# On Windows:

# gem install mysql

# Choose the win32 build.

# Install MySQL and put its /bin directory on your path.

# 

# And be sure to use new-style password hashing:

# [http://dev.mysql.com/doc/refman/5.0/en/old-client.html](http://dev.mysql.com/doc/refman/5.0/en/old-client.html)

development:  
adapter: mysql  
encoding: utf8  
database: MovieApp\_development  
pool: 5  
username:root  
password:  
host: localhost

# Warning: The database defined as “test” will be erased and

# re-generated from your development database when you run “rake”.

# Do not set this db to the same as development or production.

test:  
adapter: mysql  
encoding: utf8  
database: MovieApp\_test  
pool: 5  
username: root  
password:  
host: localhost

production:  
adapter: mysql  
encoding: utf8  
database: MovieApp\_production  
pool: 5  
username: root  
password:  
host: localhost

* * *

Please help me in tis regard.

---

<div class="post-metadata">

**Author:** ![adeel\_1103](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/76d3ee/32.png) [@adeel\_1103](https://www.ruby-forum.com/u/adeel_1103)\
**Post date:** [February 10, 2009, 6:16pm UTC](https://www.ruby-forum.com/t/scaffold-macro-problem/159982/2 "2009-02-10T18:16:58Z")

</div>

On 10 Feb 2009, at 17:04, Adeel Shahzad wrote:

> development:  
> adapter: mysql  
> encoding: utf8  
> database: MovieApp\_development  
> pool: 5  
> username:root

the space (or rather lack of space) between username and root is  
significant

Fred

---

<div class="post-metadata">

**Author:** ![adeel\_1103](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/76d3ee/32.png) [@adeel\_1103](https://www.ruby-forum.com/u/adeel_1103)\
**Post date:** [February 10, 2009, 6:30pm UTC](https://www.ruby-forum.com/t/scaffold-macro-problem/159982/3 "2009-02-10T18:30:43Z")

</div>

Frederick C. wrote:

> On 10 Feb 2009, at 17:04, Adeel Shahzad wrote:
> 
> > development:  
> > adapter: mysql  
> > encoding: utf8  
> > database: MovieApp\_development  
> > pool: 5  
> > username:root
> 
> the space (or rather lack of space) between username and root is  
> significant
> 
> Fred

Thanx Fred. But the thing is that database is created in DB using the  
same database.yml and the same database.yml is not working for scaffold.

I have seen, there is no issue with spaces.

---

<div class="post-metadata">

**Author:** ![adeel\_1103](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/76d3ee/32.png) [@adeel\_1103](https://www.ruby-forum.com/u/adeel_1103)\
**Post date:** [February 10, 2009, 6:55pm UTC](https://www.ruby-forum.com/t/scaffold-macro-problem/159982/4 "2009-02-10T18:55:51Z")

</div>

On 10 Feb 2009, at 17:30, Adeel Shahzad wrote:

> > the space (or rather lack of space) between username and root is  
> > significant
> > 
> > Fred
> 
> Thanx Fred. But the thing is that database is created in DB using the  
> same database.yml and the same database.yml is not working for  
> scaffold.
> 
> I have seen, there is no issue with spaces.

I suggest you try again - I can replicate the exact error you get with  
my apps by removing the space after the :  
Those spaces are important in yaml, as is indentation  
Fred
