# Trying to reproduce "Creating a weblog in 15 minutes"

**URL:** <https://www.ruby-forum.com/t/trying-to-reproduce-creating-a-weblog-in-15-minutes/108472>\
**Category:** Rails\
**Created:** [July 3, 2007, 9:59pm UTC](https://www.ruby-forum.com/t/trying-to-reproduce-creating-a-weblog-in-15-minutes/108472 "2007-07-03T21:59:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bluejaguar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e0b2c6/32.png) [@bluejaguar](https://www.ruby-forum.com/u/bluejaguar)\
**Post date:** [July 3, 2007, 9:59pm UTC](https://www.ruby-forum.com/t/trying-to-reproduce-creating-a-weblog-in-15-minutes/108472/1 "2007-07-03T21:59:23Z")

</div>

This is exactly 3 minutes into the video rails\_take2\_with\_sound.mov  
from [Ruby on Rails — A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.](http://www.rubyonrails.org/screencasts).

I have just created the database and posts table. I’m on a Windows  
box.

Let’s say for a newbie this type of error is under-informed and a show  
stopper.

C:\ruby\brablog\>…\bin\ruby ./script/generate model Post  
C:/ruby/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 32, col -1: `’  
(ArgumentError)  
from C:/ruby/lib/ruby/1.8/yaml.rb:133:in `load' from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/ initializer.rb:523:in `database\_configuration’  
from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/  
initializer.rb:228:in `initialize_database' from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/ initializer.rb:88:in `process’  
from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/  
initializer.rb:43:in `send' from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/ initializer.rb:43:in `run’  
from ./script/…/config/…/config/environment.rb:13  
from C:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:  
27:in `gem_original_require' from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 27:in `require’  
from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/  
generate.rb:1  
from C:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:  
27:in `gem_original_require' from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 27:in `require’  
from ./script/generate:3

My database.yml is as follows:

# MySQL (default setup). Versions 4.1 and 5.0 are recommended.

# 

# Install the MySQL driver:

# gem install mysql

# On MacOS X:

# gem install mysql – --include=/usr/local/lib

# 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  
database: blog\_development  
username: root  
password: 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  
database: blog\_test  
username: root  
password: password  
host: localhost

production:  
development

---

<div class="post-metadata">

**Author:** ![bluejaguar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e0b2c6/32.png) [@bluejaguar](https://www.ruby-forum.com/u/bluejaguar)\
**Post date:** [July 3, 2007, 10:22pm UTC](https://www.ruby-forum.com/t/trying-to-reproduce-creating-a-weblog-in-15-minutes/108472/2 "2007-07-03T22:22:25Z")

</div>

We have some tutorials (screencasts plus written text) explaining the  
whole thing. We use our IDE, Ruby In Steel in these. However, if you are  
using some other IDE, you can still follow the essential details of our  
tutorial, cutting and pasting the Ruby/RHTML code as you need it.

There’s an old tutorial here (with a PDF download of instructions plus a  
screencast):  
[http://www.sapphiresteel.com/Create-a-Weblog-With-Ruby-In-Steel](http://www.sapphiresteel.com/Create-a-Weblog-With-Ruby-In-Steel)

That is an ‘exact’ copy of the DHH tutorial. The IDE used is a (now  
quite old) beta version of Ruby In Steel Personal Edition.

We have a newer and slightly adapted Blog tutorial (with migrations)  
here:

part one:  
[http://www.sapphiresteel.com/How-To-Create-a-Ruby-On-Rails-Blog](http://www.sapphiresteel.com/How-To-Create-a-Ruby-On-Rails-Blog)  
part two:  
[http://www.sapphiresteel.com/How-To-Create-A-Ruby-On-Rails-Blog,168](http://www.sapphiresteel.com/How-To-Create-A-Ruby-On-Rails-Blog,168)

The IDE in this tutorial is Ruby In Steel Developer 1.1.

best wishes  
Huw

SapphireSteel Software  
[http://www.sapphiresteel.com/](http://www.sapphiresteel.com/)

---

<div class="post-metadata">

**Author:** ![bluejaguar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e0b2c6/32.png) [@bluejaguar](https://www.ruby-forum.com/u/bluejaguar)\
**Post date:** [July 5, 2007, 3:04pm UTC](https://www.ruby-forum.com/t/trying-to-reproduce-creating-a-weblog-in-15-minutes/108472/3 "2007-07-05T15:04:16Z")

</div>

Hi,

Choosing another tutorial is one option.

However, no one in the Ruby community can tell me what the error is  
that I’m running into?

C:\ruby\brablog\>…\bin\ruby ./script/generate model Post  
C:/ruby/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 32, col -1:`’  
(ArgumentError)  
from C:/ruby/lib/ruby/1.8/yaml.rb:133:in `load' from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/ initializer.rb:523:in`database\_configuration’  
from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/  
initializer.rb:228:in `initialize_database' from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/ initializer.rb:88:in`process’  
from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/  
initializer.rb:43:in `send' from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/ initializer.rb:43:in`run’  
from ./script/…/config/…/config/environment.rb:13  
from C:/ruby/lib/ruby/site\_ruby/1.8/rubygems/  
custom\_require.rb:  
27:in `gem_original_require' from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb: 27:in`require’  
from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/  
generate.rb:1  
from C:/ruby/lib/ruby/site\_ruby/1.8/rubygems/  
custom\_require.rb:  
27:in `gem_original_require' from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb: 27:in`require’  
from ./script/generate:3

On Jul 3, 4:22 pm, Huw C. \<rails-mailing-l…@andreas-

---

<div class="post-metadata">

**Author:** ![bluejaguar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e0b2c6/32.png) [@bluejaguar](https://www.ruby-forum.com/u/bluejaguar)\
**Post date:** [July 5, 2007, 4:22pm UTC](https://www.ruby-forum.com/t/trying-to-reproduce-creating-a-weblog-in-15-minutes/108472/4 "2007-07-05T16:22:28Z")

</div>

Ok, so I figured this out myself.

It appears ruby files (in my case my database.yml) cannot deal with a  
TAB CHARACTER ???

If this is defined with a tab in front of development I get the parse  
error.

production:  
development

If I change this to no tab (spaces), it will parse and complete.

WT\*? Who writes a parser that deals with human edited files and  
cannot deal with tabs ?

Please make the parser smart enough to handle this.

And if you can’t parse a character please output the ASCII and/or  
‘\0x’ values of the characters that messed up the parser

AND what the file was that was being parsed.

PLEASE

---

<div class="post-metadata">

**Author:** ![bluejaguar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e0b2c6/32.png) [@bluejaguar](https://www.ruby-forum.com/u/bluejaguar)\
**Post date:** [July 5, 2007, 4:37pm UTC](https://www.ruby-forum.com/t/trying-to-reproduce-creating-a-weblog-in-15-minutes/108472/5 "2007-07-05T16:37:31Z")

</div>

On Jul 5, 2007, at 8:33 , bluejaguar wrote:

> It appears ruby files (in my case my database.yml) cannot deal with a  
> TAB CHARACTER ???

database.yml is a YAML file and not particular to Ruby (or Rails, for  
that matter). See the YAML spec.

[http://www.yaml.org/](http://www.yaml.org/)

In particular, their FAQ:

[http://www.yaml.org/faq.html](http://www.yaml.org/faq.html)

Michael G.  
grzm seespotcode net
