[前][次][番号順一覧][スレッド一覧]

rails:495

From: Stoyan Zhekov <stoyan@g...>
Date: Mon, 31 Oct 2005 10:42:23 +0900
Subject: [rails:495] Re: generate scaffold ができません

On 10/31/05, Hiroyuki Adachi <adachi@t...> wrote:
> WEB-DB PRESS 28 の1章でやっていて、いきなりつまずいてしまいました。
>
> データベースを用意して generate scaffold user とタイプしたところでエラー
> メッセージが出てそれ以上進みようが無くなりました。
>
>   $ ruby script/generate scaffold user
>   You have a nil object when you didn't expect it!
>   You might have expected an instance of Array.
>   The error occured while evaluating nil.include?
>

1. Databaseを作って:

  mysqladmin create rails_development
  mysql rails_development < db/users.sql
  ....

2. Edit config/database.yml:

  development:
    adapter: mysql
    database: rails_development
    socket: /var/run/mysqld/mysqld.sock
    username: xxx
    password: yyy

3. Controllerの名前も入れて:

>   $ ruby script/generate scaffold user
  $ ruby script/generate scaffold user Users

--
ML: rails@r...
使い方: http://QuickML.com/
Web Site: http://wiki.fdiary.net/rails/
ML Archives: http://www.fdiary.net/ml/rails/

[前][次][番号順一覧][スレッド一覧]

       492 2005-10-31 01:33 [adachi@t...         ] generate scaffold ができません          
       493 2005-10-31 02:05 ┣[don@n...            ]                                       
       499 2005-10-31 03:02 ┃┗[adachi@t...         ]                                     
       502 2005-10-31 03:19 ┃ ┗[don@n...            ]                                   
       503 2005-10-31 03:19 ┃  ┗[don@n...            ]                                 
->     495 2005-10-31 02:42 ┗[stoyan@g...         ]                                       
       497 2005-10-31 02:49  ┗[adachi@t...         ]                                     
       500 2005-10-31 03:05   ┗[stoyan@g...         ]                                   
       501 2005-10-31 03:12    ┗[drawn.boy@g...      ]                                 
       504 2005-10-31 03:23     ┣[adachi@t...         ]                               
       535 2005-10-31 23:01     ┗[kazuhiko@f...       ]