0

很抱歉复制了整个日志,但我希望这对熟悉这个问题的人来说可能更有意义。当设计开始设置用户模型时,我没有得到选项(我从未按下回车键)并且安装继续并崩溃,输出以下内容。谢谢!

           ?  What would you like the user model to be called? Press <enter> for [user] >            -  Now setting up devise with user model name 'user':
    generate  devise
      invoke  active_record
      create    db/migrate/20120825075751_add_devise_to_users.rb
      insert    app/models/user.rb
       route  devise_for :users
           -  Now you'll need an initializer...
      create  config/initializers/rails_admin.rb
/home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:385:in `block in source_reflection': undefined method `klass' for nil:NilClass (NoMethodError)
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:385:in `collect'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:385:in `source_reflection'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:375:in `rescue in foreign_key'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:373:in `foreign_key'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:259:in `association_foreign_key_lookup'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:71:in `block in associations'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:64:in `map'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:64:in `associations'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:29:in `block (2 levels) in polymorphic_parents'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:28:in `each'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:28:in `block in polymorphic_parents'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:27:in `tap'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:27:in `polymorphic_parents'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:222:in `association_model_lookup'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:69:in `block (2 levels) in associations'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/fields/types/polymorphic_association.rb:49:in `call'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/fields/types/polymorphic_association.rb:49:in `associated_model_config'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/fields/types/polymorphic_association.rb:19:in `block in <class:PolymorphicAssociation>'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/configurable.rb:68:in `instance_eval'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/configurable.rb:68:in `block in register_instance_option'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/configurable.rb:42:in `block in register_instance_option'
    from (erb):86:in `block (2 levels) in template'
    from (erb):85:in `map'
    from (erb):85:in `block in template'
    from (erb):82:in `map'
    from (erb):82:in `template'
    from /home/funkdified/.rvm/rubies/ruby-1.9.3-p125-HEAD/lib/ruby/1.9.1/erb.rb:838:in `eval'
    from /home/funkdified/.rvm/rubies/ruby-1.9.3-p125-HEAD/lib/ruby/1.9.1/erb.rb:838:in `result'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/thor-0.16.0/lib/thor/actions/file_manipulation.rb:111:in `block in template'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:54:in `call'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:54:in `render'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:63:in `block (2 levels) in invoke!'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:63:in `open'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:63:in `block in invoke!'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:133:in `call'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:133:in `invoke_with_conflict_check'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:61:in `invoke!'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/thor-0.16.0/lib/thor/actions.rb:95:in `action'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:26:in `create_file'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/thor-0.16.0/lib/thor/actions/file_manipulation.rb:110:in `template'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/rails_admin-0.0.5/lib/generators/rails_admin/install_generator.rb:59:in `install'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/thor-0.16.0/lib/thor/task.rb:27:in `run'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/thor-0.16.0/lib/thor/invocation.rb:120:in `invoke_task'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `block in invoke_all'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `each'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `map'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `invoke_all'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/thor-0.16.0/lib/thor/group.rb:238:in `dispatch'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/thor-0.16.0/lib/thor/base.rb:425:in `start'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/railties-3.2.8/lib/rails/generators.rb:171:in `invoke'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/railties-3.2.8/lib/rails/commands/generate.rb:12:in `<top (required)>'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
    from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD@rails323/gems/railties-3.2.8/lib/rails/commands.rb:29:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'
4

1 回答 1

0

我想到了。我首先安装了 devise 进行调试,发现这是我现有的用户模型的问题。我需要删除用户表并重新开始。

于 2012-08-26T04:43:37.603 回答