VMWare Playerã§ãã¹ãOSã¨ã²ã¹ãOSã®ãã©ã«ããå ±æãããã¨ãããèªèã§ããªãã£ã
Windows使ãã¨ãã¦ã¯ãrubyã®ã³ã¼ããæ¸ãã«ã¯ãã¯ãVMWare Playerã¯å¿ é ã¨ãªã£ã¦ããããã§ãããã©ããããããããã¹ãOSã¨ã²ã¹ãOSã®ãã©ã«ãã®å ±æããã¾ãåããªãã£ãã®ã§ã解決çãã¡ã¢ã£ã¦ããã¾ãã
æåã«å®è¡ããã®ã¯ä»¥ä¸ã®æé ã§ãã
ä¸è¨ã®ä½æ¥ãè¡ãã¨ãã²ã¹ãOSä¸ã§ã/mnt/hgfsãä¸ã«å ±æãããã©ã«ããåºã¦ããã¯ãã§ãããåºã¦ãã¾ããã
åããããªç¾è±¡ã«ééãã人ã¯ä»ã«ãããããããããããã°ã°ã£ãã¨ããã以ä¸ã®è¨äºãè¦ã¤ãã¾ããã
解決çï¼vmware-config-tools.plãå度å®è¡ãã¦ãVMWare Toolsãåã¤ã³ã¹ãã¼ã«ããã°ãå ±æãã©ã«ããåºã¦ãã¾ããï¼vmhgfsãæå¹ã«ãããèãããã®ã§ãyesã¨å ¥åããã®ãå¿ããªãã§ãã ãããããã©ã«ãã¯yesã ã¨æãã¾ãããããï¼
mrubyã«ã¯ã©ã¹ã¨ã¡ã½ãããçµã¿è¾¼ãã§ã¿ãï¼Windows 7ï¼
mrubyã使ããªããCã§æ¡å¼µãæ¸ãã¦ã¿ããã§ããããã¨ãããããCã§ã¯ã©ã¹ã¨ã¡ã½ãããçµã¿è¾¼ãæ¹æ³ã以ä¸ã®è¨äºãåèã«ããªããæ¸ãã¦ã¿ã¾ããã
æ¦è¦
ä¸è¨ã®è¨äºã§ã¯ãã¢ã¸ã¥ã¼ã«ã®ç»é²ã«ãªã£ã¦ããã®ã§ãã¯ã©ã¹ã®ç»é²ãmrubyã®ã³ã¼ããèªã¿ãªããå®æ½ãã¦ã¿ããã¨ã«ãã¾ãããä¸è¨ã®Helloã¯ã©ã¹ã¨åçã®ã¯ã©ã¹ãCã§æ¸ãã¦ãmrubyã«ç»é²ãã¾ãã
class Hello def hello(num) (0...num).each do |i| p "Hello mruby World!" end end end Hello.new.hello(3)
ã½ã¼ã¹ã³ã¼ã
ã½ã¼ã¹ã³ã¼ãã¯ä»¥ä¸ã®éãã§ãã
#include <mruby.h> #include <mruby/proc.h> #include <mruby/compile.h> //ç»é²ããã¡ã½ããã®å¦ç static mrb_value hello_hellofunc(mrb_state *mrb, mrb_value self) { int i; mrb_int arg; // å¼æ°ãmrb_intåï¼intåï¼ã§åå¾ãã // 第2å¼æ°ã«ã¤ãã¦è©³ããç¥ãããå ´åã¯ã // class.cã®mrb_get_argsé¢æ°ã®ã³ã¡ã³ããè¦ãã㨠mrb_get_args(mrb, "i", &arg); for (i = 0; i < arg; i++) { puts("Hello mruby World!"); } return self; } int main() { int n; mrb_state* mrb; struct mrb_parser_state* st; struct RClass *helloclass; char* code = "require 'hello'; Hello.new.hello(3)"; mrb = mrb_open(); //ã¯ã©ã¹ãå®ç¾©ãã helloclass = mrb_define_class(mrb, "Hello", mrb->object_class); //ã¡ã½ãããå®ç¾©ãã mrb_define_method(mrb, helloclass, "hello", hello_hellofunc, ARGS_REQ(1)); st = mrb_parse_string(mrb, code); n = mrb_generate_code(mrb, st->tree); mrb_pool_close(st->pool); mrb_run(mrb, mrb_proc_new(mrb, mrb->irep[n]), mrb_nil_value()); }
ãã«ãã¯ä»¥ä¸ã®æãã§ããé©å®ãç°å¢ã«åããã¦èªã¿æ¿ãã¦ãã ããã
gcc -I../mruby/include -I../mruby/src practice_mruby.c ../mruby/lib/libmruby.a -o practice.exe
å®è¡çµæã¯ä»¥ä¸ã®éãã
Hello mruby World! Hello mruby World! Hello mruby World!
ãã¤ã³ã
- mrb_stateåéè¦
- mrb_get_argsé¢æ°ã§å¼æ°ãåå¾
- mrb_define_classé¢æ°ã§ã¯ã©ã¹å®£è¨
- mrb_define_methodé¢æ°ã§ã¡ã½ãã宣è¨
- mruby.hãclass.cãèªãã°ããªãã®ãã¨ãããã
ææ³
ç¹ã«é£ãããã¨ã¯ãªãããã§ããç°å¢ãè¨èªãã¾ããã¨åä»ãªã®ã¯ããããããªåã®åã渡ããªã®ã§ããã®è¾ºã¯ããå°ã調ã¹ã¦ã¿ãå¿ è¦ãããããã§ãã
mrubyã¯ã¾ã æ å ±ãå°ãªãã®ã§ãã¨ã£ã¤ãã«ããã¨ãããããããããã¾ãããã使ãåã«ã¯ç°¡åããã§ããã
mrubyãNaClï¼Native Clientï¼ã§ãã«ããã¦ã¿ãï¼Windows 7ï¼
Ruby 2.0ではNaCl対応するらしいã§ããããã¨ãã¨NaClèªä½ãå®è¡ãã¡ã¤ã«ã®ãµã¤ãºãè¥å¤§åããããããã«ãRubyã¨ãã巨大ãªã³ã¼ããè¼ãã¦ãã¾ã£ã¦ã¯ãå®ç¨ä¸å³ããã®ã§ã¯ã¨æãã¦ãã¾ãããå®éã20MBä½ã«ãªããããã§ãã
ããã§ãçµã¿è¾¼ã¿ç¨éã¨ãã¦éçºãããmrubyãªãå°ãã¯ã¾ãã«ãªãããããªããã¨æãããã«ãã試ãã¦ã¿ããã¨ã«ãã¾ããããã®ã¾ã¾ãããªãã¨ã¯ãããªãã®ã§ãããã¨ãããããã«ãã¯æåããã®ã§æé ãæ²è¼ãã¾ãã
åæºå
mrubyã¨NaClã®ãã«ãç°å¢ãæºåãã¦ãã ããã
- Windows 7
- mrubyã®ãã«ãç°å¢ï¼MinGW, msysï¼*1
- NaClã®ãã«ãç°å¢ãä½ã
- ã¡ãã£ã¨é¢åã§ããこちらを参照してください
æé ã®æ¦è¦
mrubyã¯ããã«ãç°å¢ããæ´ããã°makeããããã ãã§ãã«ãã§ããã¨ãã親åè¨è¨ã§ããNaClã§ãã«ãããéãé害ã«ãªãã®ã¯Cã³ã¼ããèªåçæãã¦ããé¨åã§ãããã«ãä¸ã«rubyã®ã³ã¼ãããã¤ãã³ã¼ãåãã¦cã«åãè¾¼ãä½æ¥ãè¡ã£ã¦ãããããããã®éã«mrbc.exeã¨ãããã¤ãã³ã¼ããçæããå®è¡ãã¡ã¤ã«ãçæã»å®è¡ãã¦ããã®ã§ãããNaClã§ã¯nexeãçæããã®ã§ãmrbc.exeã®å®è¡ã«å¤±æãã¦ãã¾ãã¾ãã
ããã§ãmrubyã®MinGWã§ã®ãã«ããè¡ã£ã¦Cã³ã¼ãï¼mrblib.cï¼ãçæãã¦ããããªãã¸ã§ã¯ããã¡ã¤ã«ï¼*.oï¼ãåé¤ãã¦ãNaClã§ãã«ãããã¨ããããªããã¼ãªæé ãè¸ã¿ã¾ããã
libmruby.aã¨ããã©ã¤ãã©ãªãã¡ã¤ã«ãçæãããã®ã§ããããèªåã®NaClã®C++ã³ã¼ãã§ãªã³ã¯ããã°OKã§ããï¼mrubyã¯Cãªã®ã§ãããããèªã¿è¾¼ãã¨ãã«ã¯extern "C"ããã®ãå¿ããªãããã«ãã¾ããããææ°ã®ã³ã¼ããè¦ããããããã®ä¸ã«æ¸ããã¦ããã®ã§å¿
è¦ãªããã¨ã確èªãã¾ãããï¼
å ·ä½çãªæé
1. mrubyãMinGWã§makeãã¦ãã ãã
2. åãã©ã«ãã®ãªãã¸ã§ã¯ããã¡ã¤ã«ï¼*.oï¼ã¨lib/libmruby.aãåé¤ãã¦ãã ãã
3. mrubyã®Makefileãæ¸ãæãã¦ãã ãã
mrubyã®MakefileããNaClã®ãã®ãæå®ãã¦ãã ããã以ä¸ã¯x86-64ã§ãããx86ç¨ã«ã³ã³ãã¤ã«ãããªãi686-nacl-gcc.exeãæå®ãã¦ãã ãããNACL_ROOTã¯NaCl SDKãç½®ãããã¹ã¨ç½®ãæãã¦ãã ãããï¼ç§ã®ç°å¢ã ã¨/C/tools/nacl_sdk/ï¼
export CC = /NACL_ROOT/pepper_19/toolchain/win_x86_newlib/bin/x86_64-nacl-gcc export LL = /NACL_ROOT/pepper_19/toolchain/win_x86_newlib/bin/x86_64-nacl-gcc export AR = /NACL_ROOT/pepper_19/toolchain/win_x86_newlib/bin/x86_64-nacl-ar.exe
4. srcã«ç§»åãã¦makeãã¦ãã ãã
5. mrblibã«ç§»åãã¦makeãã¦ãã ãã
6. lib/libmruby.aã使ã£ã¦NaClç¨ã«æ¸ããC++ãã³ã³ãã¤ã«ãã¾ããã
ãªã©ã¨æ¸ãã¦ãä¸è¦ªåãããã®ã§ãNaClのチュートリアルã®ã³ã¼ããæ¹å¤ãã¦è©¦ãã¦ã¿ã¾ãããNaClãmrubyãå ¨ç¶ããã£ã¦ãã¾ãããã»ã»ã»ã
#include <cstdio> #include <string> #include "ppapi/cpp/instance.h" #include "ppapi/cpp/module.h" #include "ppapi/cpp/var.h" #include "mruby.h" #include "mruby/proc.h" #include "mruby/array.h" #include "mruby/string.h" #include "mruby/dump.h" #include "mruby/irep.h" #include "mruby/compile.h" class hello_tutorialInstance : public pp::Instance { public: explicit hello_tutorialInstance(PP_Instance instance) : pp::Instance(instance) { } virtual ~hello_tutorialInstance() {} virtual void HandleMessage(const pp::Var& var_message) { if (!var_message.is_string()) return; std::string message = var_message.AsString(); pp::Var var_reply; int n; mrb_state* mrb; struct mrb_parser_state* st; mrb = mrb_open(); st = mrb_parse_string(mrb, (char*)message.c_str()); n = mrb_generate_code(mrb, st->tree); mrb_pool_close(st->pool); mrb_value result = mrb_run(mrb, mrb_proc_new(mrb, mrb->irep[n]), mrb_nil_value()); char s[256]; sprintf(s, "%d", result.value.i); var_reply = pp::Var(s); PostMessage(var_reply); } }; class hello_tutorialModule : public pp::Module { public: hello_tutorialModule() : pp::Module() {} virtual ~hello_tutorialModule() {} virtual pp::Instance* CreateInstance(PP_Instance instance) { return new hello_tutorialInstance(instance); } }; namespace pp { Module* CreateModule() { return new hello_tutorialModule(); } } // namespace pp
HTMLã¯ä»¥ä¸ã®éãã§ãã'125+245'ã¨ããåç´ãªè¶³ãç®ãmrubyã«æ¸¡ãã¦ãã¾ãã
<!DOCTYPE html> <html> <head> <title>hello_tutorial</title> <script type="text/javascript"> hello_tutorialModule = null; // Global application object. statusText = 'NO-STATUS'; function moduleDidLoad() { hello_tutorialModule = document.getElementById('hello_tutorial'); updateStatus('SUCCESS'); //ããã§Rubyã®ã³ã¼ãã¨ãã¦'125+245'ãéä¿¡ hello_tutorialModule.postMessage('125 + 245'); } function handleMessage(message_event) { alert(message_event.data); } function pageDidLoad() { if (hello_tutorialModule == null) { updateStatus('LOADING...'); } else { // It's possible that the Native Client module onload event fired // before the page's onload event. In this case, the status message // will reflect 'SUCCESS', but won't be displayed. This call will // display the current message. updateStatus(); } } function updateStatus(opt_message) { if (opt_message) statusText = opt_message; var statusField = document.getElementById('status_field'); if (statusField) { statusField.innerHTML = statusText; } } </script> </head> <body onload="pageDidLoad()"> <h1>Native Client Module hello_tutorial</h1> <p> <div id="listener"> <script type="text/javascript"> var listener = document.getElementById('listener'); listener.addEventListener('load', moduleDidLoad, true); listener.addEventListener('message', handleMessage, true); </script> <embed name="nacl_module" id="hello_tutorial" width=0 height=0 src="hello_tutorial.nmf" type="application/x-nacl" /> </div> </p> <h2>Status</h2> <div id="status_field">NO-STATUS</div> </body> </html>
ææ³
x86-64ã®ãã¡ã¤ã«ãµã¤ãºã¯4MBã§ãããWindowsã®exeã¯1MBã¡ããã ã£ãæ°ãããã®ã§ãããå°ãå°ãããªã£ã¦ã»ããã¨ããã§ãããæ¬å®¶ã®rubyããã¯ã¾ãã«ãªãããããªãããªã¨æãã¾ããæããNaClã®å®è¡ãã¡ã¤ã«ã¯å¤§ããããæ°ããã¦ããã®ã§ããã®è¾ºã¯Googleã«é å¼µã£ã¦ã»ããã¨ããã§ãã
NaClã«è©³ãããªãã®ã§ãããNaClãçæããmrbc.exeãå®è¡ãããã¨ã¯ã§ããï¼nexeãå®è¡ããæ¹æ³ããã£ãã¯ãï¼ã¨æãã®ã§ãæ®éã«ç°å¢ã«å¿ãã¦å ´ååãããmakeãã¡ã¤ã«ãæ¸ãã°ããããªããªããã¼ãªãã¨ãããªãã¦ããã«ãã§ããããã«ãªãã¨æãã¾ãã
mrubyã¯éçºãæ´»çºã¿ãããªã®ã§ï¼ãã®è¨äºãæ¸ãã¦ããéããææ°çã®Makefileã®æ§é ãå¤ãã£ããã¨ã«æ°ã¥ãã¦æ¸ãç´ããããã¦ãã¾ãï¼ããã£ã¼ãããã¯ãããããã¨ãããããæç¨ãªã®ããªã¨èãã¦ãã¾ãã
# è¨èªãã¢ããªã«çµã¿è¾¼ããã¨ã«ã¯ã¯ã¯ã¯ããã®ã¯ç§ã ãã§ã¯ãªãã»ã»ã»ã¯ãã
ããã«ãã¦ããã¾ã¨ãã«Makefileãè¦ãã®ãC++ãæ¸ãã®ã7 ï½ 8å¹´ã¶ããªã®ã§ãå 容çã«å¿ãã¨ãªãæãã§ããçªã£è¾¼ã¿å¤§æè¿ã§ãã
*1:ããããã®binãç°å¢å¤æ°ã®PATHã«è¿½å ãã¦ãã ãã
mrubyãWindows 7ï¼MinGW, msysï¼ã§ãã«ããã¦ã¿ã
æè¿ãmrubyãã½ã¡ã½ã¡ã¨è§¦ã£ã¦ãã¾ããæ軽ã«è¨èªãã¢ããªã«çµã¿è¾¼ããã£ã¦ã¯ã¯ã¯ã¯ãã¾ãã»ã»ã»ããï¼
ãã¦ãåå¿é²ã¨ãã¦ãWindowsã«ããããã«ãæé ãè¨é²ãã¦ããã¾ããç§ã¯Windowsã§ãã«ããããã¨ããã¾ããªãã®ã§ããã®è¾ºã®åå°åããã¾ãã¡ãªãã£ããããã®ã§ãããä¸å®ã ã£ãã®ã§ããã»ã»ã»ã
- Windows 7
- MinGWã¨msysãå ¥ããï¼ç°å¢å¤æ°ã®PATHã«ããããã®binã追å ãã¾ãï¼
- mrubyã®ã³ã¼ããåå¾ãã¦ãmakeãã
binã®ä¸ã«mruby.exeãmrbc.exeãmirb.exeãã§ãã¾ãããmirb.exeã§å¯¾è©±çã«Rubyã®å®è¡ã試ãã¾ãã
ãæ軽ã§ããï¼
ã¯ã¦ãªããã°ã«ã試ãã§æ¸ãã¦ã¿ã¾ã
ã©ãããããããã§ããé·å¹´ã¯ã¦ãªãã¤ã¢ãªã¼ã¨ã¯ã¦ãªããã¯ãã¼ã¯ãæç¨ãã¦ãããã®ã¨ãã¦ãã¯ã¦ãªããã°ããããªãã«ã¯ä½¿ããªãã¨ãªã¨æãããããã«æ¸ãã¦ã¿ããã¨ã«ãã¾ããã
ç´æçã«ã¯tumblrã§ããã°ãéè¨ããã¨ãã®ãããªæ軽ããæãã¾ããã
tumblrã¯ãæ軽ãªããã°ãµã¼ãã¹ã¨ãã¦ãæç¨ãªã®ã§ãæ·å± ãé«ãã¨æãããã¡ãªã¯ã¦ãªã«ã¨ã£ã¦ããæ軽ãªããã°ãµã¼ãã¹ã¨ãã¦å®çãã¦ããå¯è½æ§ã®ç´ 質ã¯ããã®ããªã¨æãã¾ããï¼ã¨ã£ã¦ãåããã©ãã§ãã^^;ï¼
â» å¼ç¤¾ã®è©±ãããã°ãCrowsnestã®æ å ±çºä¿¡ãè¡ã£ã¦ããCrowsnest æ¥æ¬èªããã°ã¯ãtumblrã使ã£ã¦ãã¾ããç¬èªãã¡ã¤ã³ã使ãã¾ãããéç¨ã楽ã ãããã¶ã¤ã³ãé¸ã¹ã°ãªããªãããã¦ãããã¨ãè¨ããã¨ãªãã§ããã
ã¯ã¦ãã¨æ¸ããæã«ãã¯ã¦ãªããã¯ãã¼ã¯ãæãã®ããã¯ã¦ãªããã°ãæãã®ãå¾®å¦ã§ããããã¶ããã¯ã¦ããã¯ã¦ããã¿ãããªæãã§ä½ã¿åãã¦ããã®ã ããã»ã»ã»ã¨ãããä½ã¿åãã¦ãã£ã¦ã»ããã¨ããããååããã¡ã¤ã³åãå¾®å¦ãããã®ã§ãä½ã¨ããªããªãã®ããªãã»ã»ã»ã
RailsDevCon2010ã«è¡ã£ã¦ãã
ä»æ¥ï¼ã¨ãããããæ¨æ¥ã§ããï¼ã¯RailsDevCon2010ã«è¡ã£ã¦ãã¾ãããå ´æã¯ãªã©ã¯ã«éå±±ã»ã³ã¿ã¼ã§ããRailsç³»ã®ã¤ãã³ãã«è¡ãã®ã¯ä¹ ã ã ã£ãã®ã§ãããããã¨åèã«ãªãæ å ±ãå¾ããã¨ãã§ãã¾ããã
以ä¸ããã®ã¤ãã³ãã«é¢ããææã§ãã
RailsDevCon2010ã«ã¤ãã¦
RailsDevCon2010ã«è¡ã£ã¦ã¿ã¦æãããã¨ã¯ãRailsã軸ã«ããã«ã³ãã¡ã¬ã³ã¹ã¯ãã¼ãºãç¸å½ãã£ãã®ã ãªã¨ãããã¨ã§ããã
RailsDevConã¯ä»¥ä¸ã®åãã«çããããã«éå¬ããã¾ããã
ï¼ä¸è¨ããããRailsDevCon2010ã®ãã¼ã¸ããå¼ç¨ï¼
ã¤ãã³ãã®ç®çãã¾ã¨ãã¦ãã¾ãã°ãäºä¾ã®ç´¹ä»ã¨ãã¦ãã¦ããã¹ããã©ã¯ãã£ã¹ã®å ±æããã¨ã¯ã¨ã³ã¸ãã¢å士ã®äº¤æµã¨è¨ããã¨ã«ãªãã§ããããæ¥æ¬ã§ã¯ãrubyistã¨Rails使ãã¯è¢«ã£ã¦ã¯ãã¾ãããè¿ãããã§éãåå¨ãªã®ã§ãåãé¢ããã¤ãã³ããè¡ããããã¨ã«ã¯å¤§å¤æå³ãããã¾ããã
è¬æ¼è ã®äººé¸ããã¨ã³ã¿ã¼ãã©ã¤ãºãã³ã³ã·ã¥ã¼ãï¼ã½ã¼ã·ã£ã«ã²ã¼ã ï¼ãTDDã¨ãããBDDç³»ã®æ¹ã ã¨ãã©ã³ã¹ãåãã¦ãã¾ããããããTDDã«åã£ã¦ããã©ï¼ç¬ï¼ãååã¨è¨ããã¨ãèããã°ãã¨ã¦ããã人é¸ã ã£ãããã«æãã¾ããé人åºçä¼ã®å¯¾é¢è²©å£²ã¨ããé¢ç½ã試ã¿ãããã¾ããã
次å以éãæå¾ ã§ããã以ä¸ãåå¥ã®ã»ãã·ã§ã³ã®ææ³ãªã©ã
渡米ãã¦æãããã¨ï¼@masuidriveããï¼
ã²ã¨ãã¨ã§è¨ãã¨ãæµ·å¤çµé¨ãããããããããç´¹ä»ããã¨ããæãã§ãããå½¹ç«ã¤è©±ãã¡ãã»ãã¨ãé¢ç½ãããªã¨ããã以ä¸ã«ããã¯ã¢ãããã¾ãããå¾ éãæ±ãããã¦ããã¹ãã«ã®ã¨ããã¯åèã«ãªãã¨ãããå¤ãã¨æãã¾ãã
- æµ·å¤ã§ã¯ã¹ã¿ã¼ãã¢ãããæ°è¦æ¡ä»¶ã«Rubyããã使ããã¦ãããã¨
- Rubyç³»ã®æ±äººã¯JavaãPHPã¨æ¯ã¹ãã°å°ãªããã®ã®ãæ°è¦æ¡ä»¶ãå¤ããæ¡ä»¶ããããã®ãå¤ã
- Ruby/Railsã®æè¡ã¯ä¸çã§éç¨ãã
- åãæ¹ãªã©å¾ éé¢ã¯äº¤æ¸ããä½å°ããã
- ä»äºãæ¥æ¬ã«ç¸ããããã¨ããªãã®ã§ãæµ·å¤ã®ä»äºçµé¨ãæã£ã¦ããã¨ç²¾ç¥çã«æ¥½
Railsæ å ±æºã®æ©ãæ¹ï¼ä»®ï¼ï¼@ITå¯ç·¨éé·ã西æè³¢ããï¼
ææ°ã®æ å ±ã大éã«ã¦ã©ããããªãã¦ã¯ãªããªãè¨è ããRailsç³»ãã¦ã©ããããéã«ã©ã®ãããªæ å ±æºã«ãããã®ãã¨ããç¹ã§é常ã«èå³æ·±ãçºè¡¨ã§ããã試ãã«Railsã§è¨è ã®æ¥ç¸¾ï¼åãµã¤ãã«æ稿ããè¨äºã®ã¯ã¦ãæ°ãªã©ã®æ å ±ãè¦ããã模æ§ï¼ãè¦ããããµã¼ãã¹ãä½ã£ããããã¦ããã¨ã®ãã¨ã
çºè¡¨åãï¼ä»®ï¼ã®ã¾ã¾ãªãã ãã©ãããã§ããã®ããªã»ã»ã»ï¼
Railsã«é¢ããæ å ±ã¯è±èªãå¤ãã®ã§ãè±èªç³»ã®æ å ±æºãå å®ãã¦ãã¾ãããå ¨ã¦ã¯è¿½ãã¾ããã§ããããä¸é¨ã以ä¸ã«ç´¹ä»ãã¾ãã
- å
¬å¼ãµã¤ãããã§ãã¯ï¼http://rubyonrails.org/
- Ruby on Rails: Screencasts
- Ruby on Rails Guides
- Ruby on Rails Documentation
- ããã¥ã¡ã³ãä¸ã§ã¡ã½ããã®å®è£ ããã®å ´ã§è¦ãããRubyã®æåã¯æãé£ãã¨ã®ãã¨
- å ¬å¼ããã°ï¼Riding Rails
- Rails Wiki => Rails Wiki
- å ¬å¼ãªãã¸ããªï¼rails's rails at master - GitHub
- å ¬å¼BTSï¼ã¹ãã å¤ãï¼ï¼ãªããã¢ã¯ã»ã¹ã§ããããã
- å ¬å¼ã¹ã¯ãªã¼ã³ãã£ã¹ãï¼Ruby on Rails: Rails 3 Screencasts
- åæ»æ°å³ã ãã©ãEdge Rails.info :: Articles
- ãã©ã°ã¤ã³ãæ¢ã
- githubã§ã¦ã©ããæ°ã¨ãã©ã¼ã¯æ°ãè¦ãã®ãããï¼200ãããã¦ã©ããããã¦ããã°ãçµæ§ããã¦ãããã ããæ´æ°ãåæ¢ãã¦ããªãã確èªãã¹ãï¼
- Asakusa.rb
- RubyGems.org | your community gem host
- The Ruby Toolbox - Know your options!
- Rails Plugins Compatibility Tracking - RailsPlugins.org
- Railsæ å ±åéç³»ãæè²ç³»
- ã³ãã¥ããã£/ã«ã³ãã¡ã¬ã³ã¹ç³»
- ãã®ä»
- Matzにっきã«ãã¾ã«éè¦ãªæ å ±ãã»ã»ã»
ããã ãè¦ã¦ãæ å ±ã®ãããæ¹ãåãã¨ããè¨ãã¾ãããè¿ã ã@ITã§Railsã®æ å ±ããã¨ãªããµã¤ããå§ã¾ãããã§ããæå¾ ã§ããã
ã¨ããã½ã¼ã·ã£ã«ã¢ããªã®éçºéç¨ï¼ããªã³ã @onkããï¼
ãããããä»åã®çºè¡¨ã§ãã£ã¨ãé¢ç½ãã£ãçºè¡¨ã§ãããã½ã¼ã·ã£ã«ã¢ããªã®éçºã«ãããåé¡ç¹ã以ä¸ã®3ã¤ã«ã¾ã¨ãã¦ã工夫ããç¹ãªã©ãç´¹ä»ãã¦ãã ããã¾ããã
- Social APIãå©ç¨ããã¢ããªéçºã®ãããã°
- ã¦ã¼ã¶ã¼æ°ã®æ¥æ¿ãªå¢å
- çç´æ
以ä¸ãåå¥ã®å 容ã«ã¤ãã¦ã
- Social APIãå©ç¨ããã¢ããªéçºã®ãããã°
- net-http-spy gemã§ãã¬ã¼ãä»è¾¼ãã ããtcpflowã§ãµã¼ãã«æ¥ããã±ããããã§ãã¯
- å°ã£ããã¬ã¹ãã³ã¹ããã§ãã¯
- å°ã£ããTCPã¬ã¤ã¤ã¼ã¾ã§éãã
- ã¦ã¼ã¶ã¼æ°ã®æ¥æ¿ãªå¢å
- è² è·ã®è¦ç©ãã
- ã¢ã¯ãã£ãã¦ã¼ã¶ã¼10ä¸ã¨ãã¦ã1人100imp/day = 1000ä¸imp/day
- 230imp/secï¼å¹³åãåã£ã¦ããã¼ã¯æãèæ ®ãã¦2åï¼
- 1ç§ã«1ãªã¯ã¨ã¹ããè¿ãã®ãªããunicornã¤ã³ã¹ã¿ã³ã¹ã230å¿ è¦
- memcacheãDBã¨ãã«1000 ã 2000qpså¿ è¦
- Webã¡ã¢ãª8GBã®ãã·ã³ã5å°ãmemcacheã¯1å°ã§OKãDBãããªãã®ãã·ã³ãªã1å°ã§OKã»ã»ã»ã¨ã¯ãªããªã
- DBã«é¢ãã工夫
- ã²ã¼ã ã¯æ´æ°ç³»ã®ã¯ã¨ãªãå¤ãã®ã§ãã¬ããªã±ã¼ã·ã§ã³ã ãã§ã¯masterã®DiskIOã溢ãããããåç´åå²å¿ è¦ãããã«ãããJOINä¸è½ï¼has_manyçã使ããªãï¼
- ãã¼ã¿éã®å¢å ï¼ã¬ã³ã¼ããå¢ããã¯ãªãã¯ã1ç§1ã¯ãªãã¯ã¨ãã¦ããæ¯æ260ä¸ã¬ã³ã¼ããå¢å ãæ®éã¯æ°åä¸ã¬ã³ã¼ããå¢ããï¼ã«å¯¾å¿ããããã«ããã¼ãã£ã·ã§ãã³ã°
- è² è·ãã¹ã
- JMeterãã¹ã«ã¼ããããDiskIOãconnectionæ°ããã§ãã¯
- 50ä¸ã¦ã¼ã¶ã¼ã3ã¶æéãã ãã¼ã¿ãä½ã£ã¦ãã¹ããå®æ½
- faker gemãªã©ã使ãã¨ãã¹ããã¼ã¿ãä½ãããã
- è² è·ã®è¦ç©ãã
- çç´æ
- 2ã¶æã§ãªãªã¼ã¹ã1ã¶æã«2åã®æ´æ°ãªã©ãããã¾ã
- Railsãããã大åã«ãã¦éçºãé«éå
- ç¡é§ãªããã¥ã¡ã³ããä½ããªã
- URLè¨è¨æ¸ãERå³ã ãã§é²ãã
- ãã°ãç¾å¨ã®ãµã¼ãã¹ã®ç¶æ³ãæéã§ç¢ºèªã§ããç°å¢ãä½ã£ã¦ã対å¿çãç´ æ©ã
ããªãæ¿ãã£ãã®ã§ãçºè¡¨è³æã®å ¬éãå¾ ããã¾ããã¡ã¢ã®ååãè¨äºã«ã§ãã¾ããã§ããããã
Railsããã¸ã§ã¯ããæåãããããã«ç¾å ´ãã§ãããã¨ï¼ukstudioããï¼
ããªã¼ã©ã³ã¹ã¨ãã¦æ´»èºããã¦ãã@ukstudioããã®ç¾å ´ããå¾ãç¥è¦ãçºè¡¨ã¨ã®ãã¨ãæ½è±¡çãªè©±ã«ãªã£ã¦ãã¾ã£ã¦ãã¾ããããæ¦ãé ·ããå 容ã ã£ãã®ã§ãããã¾ã§ã®çµé¨ãæãè¿ãã¦ããããèããææã«ãªãã¾ããã
æè¡çãªè² åµãããè¾¼ã¾ãªãããã«ãéçºããã»ã¹ã«æè¡çãªè² åµãè¿ãå·¥ç¨ãå«ãããã¨ãã話ã
- TDD
- ãã¼ã¸ã§ã³ç®¡ç
- 使ããªãæ©è½ã¯æè¡çãªè² åµã¨åããªã®ã§ãæ¸ãã工夫ãå¿ è¦
æãã«ããã®ç¨®ã®çºè¡¨ã¯ã©ããã¦ããµããµãã¨ããå 容ã«ãªããããã®ã§ãæè¡çãªè² åµã®å ·ä½çãªä¾ãTDDããªãã¢ã¸ã¥ã¼ã«ã®çµå度ãä¸ãã¦åé度ãä¸ããã®ããTDDãçºçãæãã¦ãããè² åµã®ä¾ããªãã¡ã¯ã¿ãªã³ã°ã解決ãã¦ãããè² åµã®ä¾ããã¼ã¸ã§ã³ç®¡çã®ãã¤ã³ããªã©ãã©ããã«çµã£ã話ãèãããã£ãããã
ç¾å®ã®ä¸ç㧠"ã¯ãããï¼Cucumber"ï¼@moroããï¼
Cucumberã®å°å ¥ã«ã¤ãã¦ãç¾å®çã«å°å ¥ããããã®æé ãä¸å¯§ã«è§£èª¬ã以ä¸ã®3ã¤ã®çåã軸ã«ãããããããå°å ¥æ¹æ³ãç´¹ä»ãã¦ãã¾ããã
- æ¥æ¬èªã®æ å ±ããªã
- ä»ã®ããã¸ã§ã¯ãã¸é©ç¨ããä½æ¦ãæãã¤ããªã
- æ¥æ¬èªã®ã·ããªãªã«ä½¿ãéããªã
å®ã¯ãã®è¬æ¼ãä¸çªå®ç¨çã ã£ãã¨æãã¾ãã
- 誤解ãå°å ¥ã«å¤±æããèãæ¹
- ããé©ããèãæ¹
å人çã«ã¯ãåããªãCukeã§ããã¦ã¼ã¹ã±ã¼ã¹è¨è¿°ã«è¿ãå 容ã«ãªãã®ã§ãä»æ§ã®å ±æã«æå¹ãªããã¥ã¡ã³ãã«ãªãå¾ãã¨èãã¦ãã¾ããç¹ã«ã¨ã³ã¿ã¼ãã©ã¤ãºã§ã¯ããã§ããããããããã¹ãã«ãªããªãã¦ç´ æ´ãããä¸çãä¸åº¦ãå®æ¡ä»¶ã§ä½¿ã£ã¦ã¿ãããã®ã§ãã
Rails Add-onsã§æ¥½ã éçº - youRoomãé¡æã« -ï¼SonicGardenæ¾æããï¼
youRoomã®éçºã§ä½¿ç¨ãããã©ã°ã¤ã³ãã¦ã§ããµã¼ãã¹ãªã©ã®ç´¹ä»ãæ¬æ¥ã«é¢ä¿ãªãç¬ççã¯å¤é¨ã®ãµã¼ãã¹ãªã©ãæ´»ç¨ãã姿å¢ã«ãå ±æãæãã¾ããã
- ãã©ã°ã¤ã³ç³»
- OmniAuth èªè¨¼ãã¬ã¼ã ã¯ã¼ã¯
- searchlogic gem
- ãµã¼ãã¹ç³»
- GoogleDocs
- Amazon Web Sevice
- heroku
- Hoptoad: The app error app
- æ å ±å ±æåºç¤
åãã¦ãRuby
å§ãã¦ãããè¨èªãRubyã¨ããä¸ä»£ãçã¾ãã¤ã¤ããããã§ã@a_matsudaããã@yuumi3ããã®æãåéã«ããããã«ãã£ã¹ã«ãã·ã§ã³ã
- 質åï¼ Ruby/Railsãã©ããã£ã¦åå¼·ãã¾ãããï¼
- 質åï¼ Ruby/Railsãåå¼·ãã¦ãã¦èºããã¨ããã¯ï¼
- 質åï¼ ããããªãã£ããã¨ããããããã«ãªã£ãç¬éã¯ï¼
- ã¾ã¨ã Rubyãããããããï¼
- 質å æåã«ãããæãã¦ãã¦ãããããã£ã¨æ©ãã«ç解ã§ããã®ã«ãã¨ãããã®ã¯ããã¾ãããï¼
è¥ãä¸ä»£ã®è©±ã§é常ã«èå³æ·±ãå 容ã§ãããæè²ãéãã¦Ruby/Railsæåãè²ã¦ã¦ããã¨ãããã¨ã¯é常ã«å¤§åãªãã¨ã§ããæè²ç³»ã®äººãã¡ã®çºè¡¨ã¯æ¬¡å以éãèãããã§ãã
ããããã°ãRubyç³»ã®äººã¯åªããã¨ãã話ãããã¾ãããã»ã»ã»rubyistã¯æãã¨ããã®ãå®èª¬ã ã£ãã®ã«ï¼ï¼ç¬ï¼
ã¾ã¨ã
次å以éã®ã¤ãã³ãã楽ãã¿ã§ããã¨ã³ã¿ã¼ãã©ã¤ãºã ã¨å¥ç´ä¸é£ããã¨ãããããã¨æãã¾ããããã¡ãã®æ¹é¢ã®äºä¾ã®è©±ãå ¥ãã¨ãã£ã¨èå³æ·±ãã¨æãã¾ãããç§ã¯Webç³»ãªã®ã§ãã¾ãä»äºä¸ã¯é¢ä¿ãªãã®ã§ãããªã³ã ããã®äºä¾ã ãã§ååæºè ¹ã§ãããã©ã
ãããã«ããç´ æ´ãããã¤ãã³ãã§ãããéå¶ã®çæ§ããç²ãæ§ã§ããããããã¨ããããã¾ããï¼
å ±åè³¼å ¥ãµã¼ãã¹ãgroupå²ããå§ã¾ãã¾ããï¼
ä¸éã§ã¯ãã©ãã·ã¥ãã¼ã±ãã£ã³ã°ã¨ãã½ã¼ã·ã£ã«ã³ãã¼ã¹ã¨ãããèãæ¹ãæ¡ç¨ããããããGrouponç³»ãµã¼ãã¹ãæµè¡ã£ã¦ãã¾ããç§ãæä¼ã£ã¦ãã株式会社spice lifeãéå¶ãã¦ããブラウザ上でオリジナルTシャツが作れるウェブサービス「tmix」ã§ããæµè¡ãã«åããã¦å ±åè³¼å ¥ãµã¼ãã¹ãéå§ãããã¨ã«ãªãã¾ããã
ã©ããããµã¼ãã¹ï¼
groupå²ã¯ãtmixã§ãã¶ã¤ã³ãããªãªã¸ãã«Tã·ã£ãããè¤æ°äººï¼æä½10æ以ä¸ï¼ã§å ±åè³¼å ¥ãããã¨ã§ãå®ä¾¡ããå®ãè³¼å ¥ãããã¨ãã§ãããµã¼ãã¹ã§ããï¼ææ°ãå¢ããã°å¢ããã»ã©ãã³ãã³å®ããªã£ã¦ããã¾ããï¼å¾æ¥ã®tmixã®ããªã¥ã¼ã ãã£ã¹ã«ã¦ã³ãã§ã¯ã1人ãè¤æ°æè³¼å ¥ããªãã¦ã¯å¤å¼ããããªãã£ãã®ã§ãããgroupå²ãå©ç¨ãããã¨ã«ãã£ã¦ãå¥ã ã®äººãè³¼å ¥ãã¦ããè¦å®ææ°ã«éããã°å¤å¼ããè¡ããããã«ãªãã¾ããã
æéå¶éãæä½æ°éã決ã¾ã£ã¦ããã¨ããã¯ãGrouponç³»ãµã¼ãã¹ã¨ä¼¼ã¦ãã¾ããã¨ã¯ãããgroupå²ã¯ä»ã®Grouponç³»ãµã¼ãã¹ã¨ã¯è¥å¹²ç°ãªãç¹å¾´ãæã£ã¦ãã¾ãã
groupå²ã¯ãtmixã§ãã¶ã¤ã³ããTã·ã£ãããå ±åè³¼å ¥ã«ãã£ã¦å®ãè²·ããã¨ãã§ãããµã¼ãã¹ã§ããã¤ã¾ããæ¯è¼çä¸ç¹å®å¤æ°ã®è²·ãæã対象ã¨ããGrouponç³»ãµã¼ãã¹ã¨ã¯ç°ãªããæèãå ±æãã人å士ã§æåéãå ±åè³¼å ¥ãè¡ããã¨ã«ãªãã¾ãã
ç¾å¨ã®tmixã§ã¯ããã¨ãã°ããªãä¼ã«çã¦ãããã¿Tã·ã£ããä½ãã¨ããã¹ãã¼ããµã¼ã¯ã«ãªã©ã«å±ãã¦ãã人ãç·´ç¿çãã¡ã³ãã¼ã§æãã¦ä½ãã¨ããè±å±ãããªã©ã§åãã¦ãã人ãã¹ã¿ããå°ç¨ã®ã¨ããã³ãä½ãã¨ããããããç¨éã§ä½¿ã£ã¦ãã人ãå¤ãã§ããããgroupå²ã§ããåããããªä½¿ããæ¹ãããã¨æãã¾ããããã ãã ã¨é常ã®ããªã¥ã¼ã ãã£ã¹ã«ã¦ã³ãã¨å¤ãããªã*1ã®ã§ããã第ä¸è ã§ãè²·ããã¨ãã§ããããããªã¢ã«ã®å¼·ãé¢ä¿ã¨ããããã¯ããããã¤ãªãã£ã人ãå ±æããæèã§ä½¿ããã¨ãã§ããã§ãããã
ã¨ã¯ãããgroupå²ãå§ã¾ã£ãã¨ãã«ãç·©ãæèã§ã¤ãªãã£ã¦ãã人å士ã§ã©ããããæ å ±ãæ¡æ£ã§ããã®ãã¨ããåé¡ç¹ãããã¾ããï¼å®éãä»ã®ã¨ããã販売ãæç«ããã®ã¯ãªã¢ã«ãµã¼ã¯ã«ã®ã±ã¼ã¹ã°ããã§ããï¼twitterã®ãããªåªãããã¼ã«ã¯ããã¾ãããä½ãã½ã¼ã·ã£ã«ã°ã©ããæ´»ç¨ããä»çµã¿ãå¿ è¦ãªã®ããããã¾ããããã®è¾ºã¯ä»å¾ã®æ¤è¨ææã§ãããã
ãªãã«ãããå®ããªãã®ã§ããããèããã«å©ç¨ãã¦ããã ããããªã¨æãã¾ãã
*1:ãã£ã¨ããé常ã®ããªã¥ã¼ã ãã£ã¹ã«ã¦ã³ãã ã¨ãå¹¹äºãã¡ã³ãã¼ã®Tã·ã£ãã®ãµã¤ãºãèãåã£ãããééããããã§ãããã£ãTã·ã£ããé ã£ããããæéãããã¾ãããgroupå²ã使ãã¨ããããæéã¯ããããªããªãã®ã§ãããããã¡ãªããã¯ããããããã¾ããã