"config/database.yml"の設定

Ruby on Rails, 広島, Symfony, CakePHP, JAVA, .NET, PHP, WEBシステム開発, ソフトウェア開発, 業務システム, コンピュータプログラミング
お知らせ:東広島市で物件情報をお探しなら ダイトホーム
コンピュータな部屋
  Rails覚え書き


Ruby on Rails, 広島, Symfony, CakePHP, JAVA, .NET, PHP, WEBシステム開発, ソフトウェア開発, 業務システム, コンピュータプログラミング

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

過去の覚え書き

2006/06/13 − "config/database.yml"の設定

2006/06/13 − 外部ファイルを使ってSQL文を実行する

2006/06/13 − MYSQLのインストール

2006/06/09 − Railsを使っているときの文字化け

2006/06/09 − 文字型変換(to_s , to_i , to_f)

2006/06/09 − Railsのイントール

2006/06/08 − インストール

2006/06/08 − Rails覚え書きとは




NEX-TREN. LLC

〒732-0052
広島市東区光町1-9-27
第2寺岡ビル 4F


TEL 082-568-2558
FAX 082-568-2559