2006-12-01ãã1ã¶æéã®è¨äºä¸è¦§
ã»ãã¡ã¤ã«ã®å ´æ db/migrate/ââ.rbã»migration ã®ãã«ãã®è¦æ¹ 1.Railsã¢ããªã®ãããã£ã¬ã¯ããªã«ç§»åããã 2.ruby script/generate migration --helpã»migration ãã¡ã¤ã«ã®ä½ãæ¹(Railsã®ããããã£ã¬ã¯ããªã§) ruby script/generate migration create_â¦
â対å¿ãã¦ãããã¼ã¿ãã¼ã¹
âscaffold æ¦è¦ scaffold(建ç¯ç¾å ´ã®è¶³å ´) - ãããã¼ãã«ãç·¨éããããã®ã¢ãã«ããã¥ã¼ãã³ã³ããã¼ã©ã¼ã®åéå½¢ãä½ã£ã¦ããããâscaffold ãªãã·ã§ã³ ruby script/generate scaffold --help âãã«ãã§è¦ã¾ãããâscaffold å®è¡ ä¾ï¼ ruby script/generaâ¦
âãã©ã³ãã®åºæ¬çãªæ¦å¿µããªãã®ä»äºããä½ãã®ãã³ãããã¯ãæ±ãä¼æ¥ã®ä¸é¨ç½²ã§ãããã¥ã¡ã³ãã®ç®¡çããããã¨ã ã¨ãã¾ããããæ¥å¥ã®é¨ç½²ããåããã³ãããã¯ãå¿ è¦ãªã®ã ããããé¨åããã¡ãã£ã¨ã ããå¤ãããã®ãã»ãããã»ãã®å°ãã ãæ¥åå½¢æ ã«â¦
GUIã§ã¯è¯ã使ããã©ãã³ãã³ãã©ã¤ã³ã§ã¯ãã¾ã使ããªãã£ãã®ã§ã»ã»ã»ãåèï¼http://www.hyuki.com/techinfo/svninit.html
Ruby on Rails 復ç¿ãâãã¼ã¿ãã¼ã¹ã®ä½æ(ä¾ï¼MySQL) create database [ãã¼ã¿ãã¼ã¹å] default character set utf8;[ãªããåå]_development [ãªããåå]_test [ãªããåå]_production âãã®ï¼ã¤ã®ãã¼ã¿ãã¼ã¹ãä½ããâ»ã¦ã¼ã¶ã¼æ¨©éè¨å®ãå¿ è¦ã§ããâ¦
æè¿ Ruby on Railsããé¢ãã¦ããã®ã§ã復ç¿ãâåãã©ã«ãã®å½¹å²ã»app ã¢ããªã±ã¼ã·ã§ã³æ¬ä½ãã¢ãã«ã»ã³ã³ããã¼ã©ã¼ã»ãã¥ã¼ãªã©ãå ¥ããã app/models -> ã¢ãã«ã®ãã¡ã¤ã«ãå ¥ãã app/controllers -> ã³ã³ããã¼ã©ã¼ã®ãã¡ã¤ã«ãå ¥ãã app/views -> â¦
ä¾ï¼#df -h ãã¡ã¤ã«ã·ã¹ãã ãµã¤ãº 使ç¨ä¸ 空ã 使ç¨% ãã¦ã³ãå ´æ /dev/hda2 18G 748M 16G 5% / /dev/hda1 45M 13M 30M 30% /boot 使ç¨ãã¦ããLinuxã®ãã¼ãã£ã·ã§ã³ã表示ããã¾ãã HDDã®ãµã¤ãºã使ç¨éããã¦ã³ãå ´æãªã©åãã£ã¦ä¾¿å©ãåèï¼http:/â¦
Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2)ã®ã¨ã©ã¼ã«ã¤ãã¦ãhttp://dev.mysql.com/doc/refman/4.1/ja/can-not-connect-to-server.html âãã¡ããåç §ãçµæçã«ã¯ã /tmp/mysqld.sock ãã¡ã¤ã«ããªãã /etc/init.d/mysqâ¦
å®éã«èµ·åããéã«ãã©ã®ã©ã³ã¬ãã«ã使ç¨ããããã¯ã /etc/inittab ã®ä¸ã«è¨è¼ããã¦ãããè¨å®å¤ã«ãã決å®ããã¾ãã inittabä¸ã«ã¯ã id:5:initdefault: çã®è¨å®ãããã¦ãã¾ãã ãã®å ´åãrunlevel:5ãè¨å®ããã¦ããäºã¨ãªãã¾ãã èµ·åããéã®ãâ¦
Linuxã®ãã£ã¬ã¯ãã®å½¹å²ã«ã¤ãã¦ã¡ã¢/ ã«ã¼ããã£ã¬ã¯ã㪠â /bin åºæ¬ã³ãã³ã â /boot èµ·åã«å¿ è¦ãªãã¡ã¤ã« â /dev ããã¤ã¹ãã¡ã¤ã« â /etc è¨å®ãã¡ã¤ã« â /homeï¼ãªãã·ã§ã³ï¼ ã¦ã¼ã¶ã¼ã®ãã¼ã ãã£ã¬ã¯ã㪠â /lib å ±æã©ã¤ãã©ãª â /libï¼ãªãã·ã§â¦
ãã¼ãã®ç¢ºèªnetstat
â»bootæã«ç«ã¡ä¸ããï¼åèµ·åã®ã¨ãã«ç«ã¡ä¸ããï¼ chkconfig --level 3 httpd on chkconfig --level 5 httpd on chkconfig --level 3 postgresql on chkconfig --level 5 postgresql on
ãã¡ãã«ããªããªãè¯ãä¸è¦§ããã http://www.atmarkit.co.jp/fnetwork/netcom/ipconfig/ipconfig.html
âæåã³ã¼ããæå®ãã¦ãã¼ã¿ãã¼ã¹ãä½æ ä¾ï¼utf8ã®å ´å create database [ãã¼ã¿ãã¼ã¹å] default character set utf8;âãã¼ã¿ãã¼ã¹ã®ç¢ºèª show databases;âãã¼ãã«ã®ç¢ºèª show tables;âã«ã©ã ã®ç¢ºèª show fields from [ãã¼ãã«å];]
ååã¯Pearãå©ç¨ãã¾ããããå©ç¨ããªãæ¹æ³ããã¡ããå©ç¨ãã¾ãããã½ã¼ã¹ã ãæ¸ãã¨ãmailsample.php
PEARãå©ç¨ããã¡ã¼ã«éä¿¡ãã¡ã¢ãã³ãã©ãåèã«ããã âPackage Information: Mail_Mime - æ¥æ¬èªå Package Information: Mail_Mime
ååã«å¼ãç¶ããSQLã¤ã³ã¸ã§ã¯ã·ã§ã³ãã¡ã¢ããããªãæ¹æ³ãããããã¡ããåèã«ãããèå¼±æ§ã®æç¡ã®ç¢ºèªã
ãã¼ã¿ãã¼ã¹ä½æã¡ã¢createdb [ãã¼ã¿ãã¼ã¹ã®åå] --encoding=[æåã³ã¼ã]â»æåã³ã¼ãåã®ä¾ utf8
æ¬æ¥ãã£ãã®ã§ãã¡ã¢ãã»ç°å¢ cent os 4.4ã»ä¿®æ£ãããã¡ã¤ã« /etc/sysconfig/network-scripts/ifcfg-eth0ã»ãã¡ã¤ã«ã®ä¿®æ£å(DHCPã§IPã¢ãã¬ã¹ãåå¾ããããã«ãªã£ã¦ãã)