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

rails:2284

From: yasuta <y.yasuta@g...>
Date: Thu, 12 Jul 2007 22:01:44 +0900
Subject: [rails:2284] postgre使用時のジェネレータ時エラー

下記環境でRailsアジャイルWEBアプリケーションにしたがいジェネレートするとエラーになります。
MySQLでは問題なく作成されるのでposgreの設定に問題があると思うのですがご指導願います。

ruby 1.8.6
gem 0.9.2
windows XP Pro
posgreSQL 8.2

エラー内容
>ruby script/generate scaffold Product Admin
      exists  app/controllers/
      exists  app/helpers/
      exists  app/views/admin
      exists  app/views/layouts/
      exists  test/functional/
  dependency  model
      exists    app/models/
      exists    test/unit/
      exists    test/fixtures/
   identical    app/models/product.rb
   identical    test/unit/product_test.rb
   identical    test/fixtures/products.yml
Couldn't find 'product' generator
>

database.ymlの設定
development:
  adapter: postgresql
  database: depot
  username: postgres
  password: ****
  host: localhost
以下同じ

posgreのSQL文
CREATE TABLE products
(
  id serial NOT NULL,
  title character varying(100) NOT NULL,
  description text NOT NULL,
  image_url character varying(100) NOT NULL,
  price numeric(10,2) NOT NULL,
  CONSTRAINT products_pkey PRIMARY KEY (id)
)
WITHOUT OIDS;
ALTER TABLE products OWNER TO postgres;


添付ファイル

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