Scaffold generation problem

After a load of errors I had finally got rails working on OS X, until
that is i tried generating a scaffold. The line I used in the terminal
was:

./script/generate scaffold Post Blog

In response to this, I got this following error:

usr/local/lib/ruby/1.8/yaml.rb:133:in load': syntax error on line 31, col -1:’ (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.6/lib/initializer.rb:459:indatabase_configuration’
from
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:181:in
initialize_database' from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:84:inprocess’
from
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:42:in
send' from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:42:inrun’
from ./script/…/config/…/config/environment.rb:13
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27: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.6/lib/commands/generate.rb:1 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:inrequire’
from ./script/generate:3

Anyone have an idea what’s wrong, thanks in advance,

Matt. :slight_smile:

My guess is that you do not have:

  1. A database server installed or running, or
  2. A valid config/database.yml

No, I have mysql installed and the native bindings installed too using
the gem. my database.yml file is fine too. Also now when i connect to
the server i get this:

=> Booting lighttpd (use ‘script/server webrick’ to force WEBrick)
=> Rails application started on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server (see config/lighttpd.conf for options)
/usr/local/lib/ruby/1.8/yaml.rb:133:in load': syntax error on line 31, col -1: ’ (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.6/lib/initializer.rb:459:in database_configuration’
from
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:181:in
initialize_database' from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:84:in process’
from
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:42:in
send' from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:42:in run’
from /Users/holland/src/blog/public/…/config/environment.rb:13
from /Users/holland/src/blog/public/dispatch.fcgi:21:in
`require’
from /Users/holland/src/blog/public/dispatch.fcgi:21