This project is archived and is in readonly mode.

#6658 new
lyo

run scaffold report error.

Reported by lyo | March 31st, 2011 @ 04:44 PM

Rails 3.0.5
ruby 1.9.2p180 (2011-02-18) [i386-mingw32]

when I run "rails generate scaffold Course name:string",cmd report @@@ javascript

error:
F:\Ruby192\bin\ptest>rails generate scaffold Course name:string

  invoke  active_record

f:/Ruby192/lib/ruby/1.9.1/psych.rb:148:in `parse': couldn't parse YAML at line 9
column 2 (Psych::SyntaxError)

    from f:/Ruby192/lib/ruby/1.9.1/psych.rb:148:in `parse_stream'
    from f:/Ruby192/lib/ruby/1.9.1/psych.rb:119:in `parse'
    from f:/Ruby192/lib/ruby/1.9.1/psych.rb:106:in `load'
    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/applic

ation/configuration.rb:88:in `database_configuration'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_r

ecord/railtie.rb:58:in `block (2 levels) in <class:Railtie>'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_

support/lazy_load_hooks.rb:36:in `instance_eval'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_

support/lazy_load_hooks.rb:36:in `execute_hook'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_

support/lazy_load_hooks.rb:43:in `block in run_load_hooks'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_

support/lazy_load_hooks.rb:42:in `each'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_

support/lazy_load_hooks.rb:42:in `run_load_hooks'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_r

ecord/base.rb:1900:in `'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/genera

tors/named_base.rb:97:in `pluralize_table_names?'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/genera

tors/named_base.rb:44:in `table_name'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/rails/ge

nerators/active_record/model/model_generator.rb:16:in `create_migration_file'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/task.rb:22

:in `run'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation

.rb:118:in `invoke_task'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation

.rb:124:in `block in invoke_all'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation

.rb:124:in `each'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation

.rb:124:in `map'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation

.rb:124:in `invoke_all'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/group.rb:2

26:in `dispatch'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation

.rb:109:in `invoke'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/group.rb:2

69:in `block in _invoke_for_class_method'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/shell.rb:7

4:in `with_padding'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/group.rb:2

58:in `_invoke_for_class_method'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/group.rb:1

50:in `_invoke_from_option_orm'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/task.rb:22

:in `run'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation

.rb:118:in `invoke_task'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation

.rb:124:in `block in invoke_all'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation

.rb:124:in `each'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation

.rb:124:in `map'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation

.rb:124:in `invoke_all'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/group.rb:2

26:in `dispatch'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/base.rb:38

9:in `start'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/genera

tors.rb:163:in `invoke'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/comman

ds/generate.rb:10:in `'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_

support/dependencies.rb:239:in `require'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_

support/dependencies.rb:239:in `block in require'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_

support/dependencies.rb:225:in `block in load_dependency'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_

support/dependencies.rb:596:in `new_constants_in'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_

support/dependencies.rb:225:in `load_dependency'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_

support/dependencies.rb:239:in `require'

    from f:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/comman

ds.rb:17:in `'

    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

Why it happened ? help! Thanks!

No comments found

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages