2006/06/13
"config/database.yml"の設定
depot> ruby script/generate scaffold Product Admin
と打つと、
----------------------------------------------------------
C:\rails\work\depot>ruby script
/generate scaffold Product Admin
exists app/controllers/
exists app/helpers/
create app/views/admin
exists test/functional/
dependency model
exists app/models/
exists test/unit/
exists test/fixtures/
create app/models/product.rb
create test/unit/product_test.rb
create test/fixtures/products.yml
#28000Access denied for user ''@'localhost' (using password: NO)
----------------------------------------------------------
というエラーが出ていたが、
"config/database.yml"に
username = "root"
password = ****
と入れると下記のようにうまくいった。
(教科書には両方空白にするようにとあったが・・・)
----------------------------------------------------------
C:\rails\work\depot>ruby script
/generate scaffold Product Admin
exists app/controllers/
exists app/helpers/
exists app/views/admin
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
create app/views/admin/_form.rhtml
create app/views/admin/list.rhtml
create app/views/admin/show.rhtml
create app/views/admin/new.rhtml
create app/views/admin/edit.rhtml
create app/controllers/admin_controller.rb
create test/functional/admin_controller_test.rb
create app/helpers/admin_helper.rb
create app/views/layouts/admin.rhtml
create public/stylesheets/scaffold.css
----------------------------------------------------------
by wada
過去の覚え書き