Linux下Ruby On Rails(ROR)学習


1.最初のエラー:
 
undefined method `render_text' for #<MytestController:0xb5df2eb4>

 
undefined method `render_text' for #<MytestController:0xb5df2eb4>
 
ネットで調べた解決方法:
今railsはrenderを使わないtext「Hello World」に変更しました.
render:text=> "hello world"
 
2.データベース作成時のエラー:
 
 
Couldn't create database for {"encoding"=>"utf8", "username"=>"root", "adapter"=>"mysql", "database"=>"mybook_development", "pool"=>5, "password"=>nil, "socket"=>"/var/run/mysqld/mysqld.sock"}, charset: utf8, collation: utf8_general_ci (if you set the charset manually, make sure you have a matching collation)
 
解決:
ネットで調べたところ、データベースにアクセスする権限がなかった.デフォルトで生成されたデータベース構成情報のpasswordフィールドは設定されていません.このフィールドを簡単に設定した後、問題が解決します.