Forum: Ruby on Rails Scaffold generation problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
4d8eb7867a11442ade43a96a031f84eb?d=identicon&s=25 Matt Holland (Guest)
on 2006-12-24 16:29
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: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 ./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:in
`require'
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:in
`gem_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:in
`require'
from ./script/generate:3

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

Matt. :)
3e6bbd5a01437feec48adf3838b15d91?d=identicon&s=25 askegg (Guest)
on 2006-12-24 20:38
(Received via mailing list)
My guess is that you do not have:

1) A database server installed or running, or
2) A valid config/database.yml
4d8eb7867a11442ade43a96a031f84eb?d=identicon&s=25 Matt Holland (Guest)
on 2006-12-25 17:43
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
This topic is locked and can not be replied to.