Newbie Question to Get Rolling on Rails

I’m not sure if this is the right place to ask such questions. If not,
my
apologies and please direct me where such questions are handled.

I am new to RoR and have been following the tutorial in Agile Web
Developement
with Rails. I have successfully gotten RoR up and running on my Mac (OS
X
10.4.6) and created a MySQL database. However, on page 57 of the
tutorial, the
command “script/generate scaffold Product Admin” is causing the
following error:

/usr/local/lib/ruby/1.8/yaml.rb:133:in load': syntax error on line 27, col 2:
host: localhost’ (ArgumentError)
from /usr/local/lib/ruby/1.8/yaml.rb:133:in load' from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:459:indatabase_configuration’
from
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:181:in
initialize_database' from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:84:inprocess’
from
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:42:in
run' from ./script/../config/../config/environment.rb:13 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:inrequire’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
require' from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/generate.rb:1 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:inrequire’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require’
from script/generate:3

I’m not sure what this error means. If you have any suggestions as to
what I
could do to get rolling on rails I’d appreciate it.

Regards

On 6/19/06, Justin J. Luciani [email protected] wrote:

I’m not sure if this is the right place to ask such questions. If not, my
apologies and please direct me where such questions are handled.

It is.

I am new to RoR and have been following the tutorial in Agile Web Developement
with Rails. I have successfully gotten RoR up and running on my Mac (OS X
10.4.6) and created a MySQL database. However, on page 57 of the tutorial, the
command “script/generate scaffold Product Admin” is causing the following error:

/usr/local/lib/ruby/1.8/yaml.rb:133:in load': syntax error on line 27, col 2:
host: localhost’ (ArgumentError)
from /usr/local/lib/ruby/1.8/yaml.rb:133:in `load’
from
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:459:in

Make sure that the whitespace in your YAML files are actually spaces
and not tabs.

– James

James,

Thanks so much for getting back to me. I have never edited that file so
I
couldn’t imagine there being any whitespace in it. I don’t understand
the code
in the yaml file and don’t want to erase anything important. Are you
certain
that the whitespace is the cause of this error?

Thanks again, I do appreciate it.

Regards,
Justin

Quoting James L. [email protected]:

the
Make sure that the whitespace in your YAML files are actually spaces
and not tabs.

– James


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Justin J. Luciani
President HL Productions
(201) 981-6352
www.healthylivingnyc.com

James L. wrote:

On 6/19/06, Justin J. Luciani [email protected] wrote:

James,

Thanks so much for getting back to me. I have never edited that file so I
couldn’t imagine there being any whitespace in it. I don’t understand the code
in the yaml file and don’t want to erase anything important. Are you certain
that the whitespace is the cause of this error?

Certain? No. But if you put a tab into database.yml when you set
your connection info, you’ll get that error.

– James

Bang on there. I had this problem in that I had:

Password:MyDBpassword

Instead of:

Password: MyDBpassword

On 6/19/06, Justin J. Luciani [email protected] wrote:

James,

Thanks so much for getting back to me. I have never edited that file so I
couldn’t imagine there being any whitespace in it. I don’t understand the code
in the yaml file and don’t want to erase anything important. Are you certain
that the whitespace is the cause of this error?

Certain? No. But if you put a tab into database.yml when you set
your connection info, you’ll get that error.

– James