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

rails:587

From: Stoyan Zhekov <stoyan@g...>
Date: Fri, 4 Nov 2005 18:32:53 +0900
Subject: [rails:587] Re: postgresqlでrakeすると出るエラー

On 11/4/05, Hiroyuki Adachi <adachi@t...> wrote:

> $ rake
>
>   1) Error:
> test_truth(UserTest):
> ActiveRecord::StatementInvalid: ERROR:  null value in column "name" \
> violates not-null constraint
>
>   2) Error:
> test_truth(UserTest):
> NoMethodError: 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.-
>
> [...]

test/fixtures/の中にyour_model.ymlファイル:

some_text:
   id: 1
  -> ここで name: john 入れて見て

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

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

       576 2005-11-04 01:34 [adachi@t...         ] postgresqlでrakeすると出るエラー        
       581 2005-11-04 07:23 ┣[miyamuko@g...       ]                                       
       583 2005-11-04 08:25 ┃┣[adachi@t...         ]                                     
       584 2005-11-04 08:34 ┃┗[adachi@t...         ]                                     
       586 2005-11-04 09:27 ┗[adachi@t...         ]                                       
->     587 2005-11-04 10:32  ┗[stoyan@g...         ]                                     
       588 2005-11-04 10:55   ┗[adachi@t...         ]                                   
       589 2005-11-04 11:21    ┗[moriq@m...          ]                                 
       593 2005-11-04 12:48     ┗[adachi@t...         ]                               
       594 2005-11-04 12:59      ┣[moriq@m...          ]                             
       597 2005-11-04 21:23      ┃┗[adachi@t...         ]                           
       599 2005-11-05 04:26      ┃ ┗[moriq@m...          ]                         
       706 2005-11-27 15:58      ┗[craftgear@a...      ] SoftwareDesign12月号の記事  
       707 2005-11-27 16:14       ┗[yu1@t...            ]                           
       709 2005-11-28 00:50        ┗[craftgear@a...      ]                         
       710 2005-11-28 02:38         ┗[yu1@t...            ]                       
       711 2005-11-28 02:59          ┗[craftgear@a...      ]