{"id":4178,"date":"2018-06-16T00:43:27","date_gmt":"2018-06-15T15:43:27","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=4178"},"modified":"2023-05-27T22:36:48","modified_gmt":"2023-05-27T13:36:48","slug":"%e3%80%90ruby%e3%80%91%e6%ad%a3%e8%a6%8f%e8%a1%a8%e7%8f%be%e3%81%ae%e4%be%bf%e5%88%a9%e3%83%84%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=4178","title":{"rendered":"\u3010Ruby\u3011Ruby\u306e\u57fa\u672c\u3001\u6b63\u898f\u8868\u73fe\u306e\u4fbf\u5229\u30c4\u30fc\u30eb(Rubular)"},"content":{"rendered":"<h2>Ruby\u3068\u306f\uff1f<\/h2>\n<p>1996\u5e74\u306b\u65e5\u672c\u4eba\u30d7\u30ed\u30b0\u30e9\u30de\u30fc\u306e\u307e\u3064\u3082\u3068\u3086\u304d\u3072\u308d\u6c0f\u306b\u3088\u3063\u3066\u516c\u958b\u3055\u308c\u305f<span style=\"color: #ff0000;\"><strong>\u300c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u8a00\u8a9e\u300d<\/strong><\/span>\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>Ruby\u306f<span style=\"color: #ff0000;\"><strong>\u69cb\u6587\u306b\u3001\u69d8\u3005\u306a\u5de5\u592b\u304c\u51dd\u3089\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u30d7\u30ed\u30b0\u30e9\u30de\u304c\u66f8\u3044\u3066\u3044\u3066\u3001\u975e\u5e38\u306b\u697d\u3057\u3044\u3068\u601d\u3048\u308b\u8a00\u8a9e<\/strong><\/span>\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u52d5\u7684\u578b\u4ed8\u3051\u306e\u8a00\u8a9e<\/h2>\n<p>Java\u3084C#\u7b49\u306e\u9759\u7684\u578b\u4ed8\u3051\u306e\u8a00\u8a9e\u3068\u9055\u3063\u3066\u3001Ruby\u306f<span style=\"color: #ff0000;\"><strong>\u52d5\u7684<\/strong><strong>\u578b\u4ed8\u3051\u306e\u8a00\u8a9e\u306a\u306e\u3067\u62bd\u8c61\u30af\u30e9\u30b9\u3084\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u7b49\u306e\u6a5f\u80fd\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/strong><\/span><\/p>\n<p>\u7406\u7531\u3068\u3057\u3066\u306f\u3001\u52d5\u7684\u578b\u4ed8\u3051\u306e\u8a00\u8a9e\u306f\u5b9f\u884c\u6642\u306b\u30e1\u30bd\u30c3\u30c9\u304c\u547c\u3073\u51fa\u305b\u308b\u304b\u3069\u3046\u304b\u5224\u65ad\u3057\u547c\u3073\u51fa\u305b\u306a\u3044\u5834\u5408\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002<\/p>\n<h2>\u300cRuby on Rails\u300d\u306e\u767b\u5834<\/h2>\n<p>2004\u5e74\u306b\u3001\u300cRuby on Rails\u300d\u3068\u3044\u3046Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u304c\u767b\u5834\u3057\u3001\u4e16\u754c\u4e2d\u3067\u5927\u6d41\u884c\u3057\u307e\u3057\u305f\u3002\uff08\u305d\u308c\u307e\u3067\u306fJava\u306eStruts\u304c\u4eba\u6c17\u3067\u3057\u305f\u304c\u3001Ruby\u306e\u65b9\u306b\u304b\u306a\u308a\u4eba\u304c\u6d41\u308c\u3066\u304d\u305f\u5370\u8c61\u3067\u3059\u3002\uff09<\/p>\n<h2>Ruby\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u4e00\u89a7\u3001\u30ea\u30ea\u30fc\u30b9\u30ce\u30fc\u30c8<\/h2>\n<table>\n<tbody>\n<tr>\n<th>\u30d0\u30fc\u30b8\u30e7\u30f3<\/th>\n<th width=\"130\">\u30ea\u30ea\u30fc\u30b9\u65e5<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>1.0<\/td>\n<td>1996\u5e74<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>2.0<\/td>\n<td>2013\u5e742\u670824\u65e5<\/td>\n<td>\u30fb\u30c7\u30d5\u30a9\u30eb\u30c8\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u304c\u3001UTF-8\u306b\u5909\u66f4\u3055\u308c\u305f\u30022016\u5e74\u304b\u3089\u516c\u5f0f\u30b5\u30dd\u30fc\u30c8\u5bfe\u8c61\u5916\u306b\u306a\u3063\u3066\u3044\u308b\u3002<\/p>\n<p>\u30fb\u30e1\u30bd\u30c3\u30c9\u306e\u30ad\u30fc\u30ef\u30fc\u30c9\u5f15\u6570\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002<\/td>\n<\/tr>\n<tr>\n<td>2.1<\/td>\n<td>2013\u5e7412\u670825\u65e5<\/td>\n<td>\u30fb\u30e1\u30bd\u30c3\u30c9\u306e\u30ad\u30fc\u30ef\u30fc\u30c9\u5f15\u6570\u3092\u4f7f\u3046\u5834\u5408\u7701\u7565\u4e0d\u53ef\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/td>\n<\/tr>\n<tr>\n<td>2.2<\/td>\n<td>2014\u5e7412\u670825\u65e5<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>2.3<\/td>\n<td>2015\u5e7412\u670825\u65e5<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>2.4<\/td>\n<td>2016\u5e7412\u670825\u65e5<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>2.5<\/td>\n<td>2017\u5e7412\u670825\u65e5<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u53e4\u3044Ruby\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u3001\u9806\u6b21\u516c\u5f0f\u306e\u30b5\u30dd\u30fc\u30c8\u304b\u3089\u5916\u308c\u3066\u3044\u304f\u306e\u3067\u3001\u3067\u304d\u308c\u3070\u6700\u65b0\u7248\u3092\u4f7f\u3046\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>Ruby\u306e\u51e6\u7406\u7cfb<\/h2>\n<h3>MRI(Matz' Ruby Implementation)<\/h3>\n<p>\u307e\u3064\u3082\u3068\u3086\u304d\u3072\u308d\u3055\u3093\u306b\u3088\u3063\u3066\u3001C\u8a00\u8a9e\u3067\u958b\u767a\u3055\u308c\u305f\u516c\u5f0f\u306e\u51e6\u7406\u7cfb\u306b\u306a\u308a\u307e\u3059\u3002\u51e6\u7406\u7cfb\u3068\u805e\u3044\u305f\u3089\u3068\u308a\u3042\u3048\u305a\u3053\u308c\u3092\u6291\u3048\u3066\u304a\u3051\u3070\u3088\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<h3>JRuby<\/h3>\n<p>Java\u3067\u5b9f\u88c5\u3055\u308c\u305f\u51e6\u7406\u7cfb<\/p>\n<h3>Rubinius<\/h3>\n<p>\u9ad8\u901f\u306aRuby\u5b9f\u884c\u3092\u76ee\u6a19\u3068\u3057\u3066\u5b9f\u88c5\u3055\u308c\u305f\u51e6\u7406\u7cfb<\/p>\n<h2>\u958b\u767a\u30c4\u30fc\u30eb<\/h2>\n<ul>\n<li>Visual Studio Code(VS Code)<\/li>\n<li>Vim<\/li>\n<li>Atom<\/li>\n<li>RubyMine<\/li>\n<\/ul>\n<h3>Visual Studio Code(VS Code)<\/h3>\n<p>Windows\u3067\u3082Mac\u3067\u3082\u5229\u7528\u53ef\u80fd\u306a\u30a8\u30c7\u30a3\u30bf\u3067\u3001\u3088\u308a\u52b9\u7387\u7684\u306bRails\u30a2\u30d7\u30ea\u3092\u958b\u767a\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3002<\/p>\n<h3>Vim<\/h3>\n<p>\u5168\u3066\u306eOS\u3067\u5229\u7528\u53ef\u80fd\u306a\u30d5\u30ea\u30fc\u306e\u30a8\u30c7\u30a3\u30bf\u3067\u3059\u3002<span style=\"color: #ff0000;\"><strong>\u69d8\u3005\u306a\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u3067\u3001Ruby\u306e\u9ad8\u6a5f\u80fd\u30a8\u30c7\u30a3\u30bf\u3068\u3057\u3066\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u305f\u3081\u975e\u5e38\u306b\u4eba\u6c17\u304c\u9ad8\u3044<\/strong><\/span>\u3067\u3059\u3002<\/p>\n<h3>RubyMine<\/h3>\n<p>Ruby\u3092\u958b\u767a\u3059\u308b\u305f\u3081\u306eIDE(\u7d71\u5408\u958b\u767a\u74b0\u5883)\u3067\u3059\u3002\u305f\u3060\u3001\u6709\u6599\uff08\u5b66\u751f\u306f\u7121\u6599\uff09\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u300cRuby on Rails\u300d\u3092\u958b\u767a\u3059\u308b\u4e0a\u3067\u3082\u7279\u5316\u3057\u305f\u69d8\u3005\u306a\u6a5f\u80fd\u3092\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u30c4\u30fc\u30eb<\/h2>\n<p>Ruby\u5c02\u7528\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u30c4\u30fc\u30eb\u3092\u4f7f\u7528\u3059\u308c\u3070<span style=\"color: #ff0000;\"><strong>\u8907\u6570\u30d0\u30fc\u30b8\u30e7\u30f3\u306eRuby\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3068\u3057\u3066\u3082\u5207\u308a\u66ff\u3048\u3092\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd<\/strong><\/span>\u3067\u3059\u3002<\/p>\n<p>\u4e00\u5ea6\u8a2d\u5b9a\u3059\u308c\u3070\u4fbf\u5229\u306b\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3084\u8a2d\u5b9a\u4f5c\u696d\u304c\u5c11\u3057\u9762\u5012\u3067\u3059\u3002<\/p>\n<p>\u4ee3\u8868\u7684\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u30c4\u30fc\u30eb\u3068\u3057\u3066\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306a\u30c4\u30fc\u30eb\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>rbenv<\/li>\n<li>RVM<\/li>\n<\/ul>\n<p>\u5b9f\u969b\u306e\u958b\u767a\u73fe\u5834\u3067\u306f\u8907\u6570\u30d0\u30fc\u30b8\u30e7\u30f3\u306eRuby\u3092\u4f7f\u3046\u3053\u3068\u304c\u5f53\u305f\u308a\u524d\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u4e0a\u8a18\u306e\u3088\u3046\u306aRuby\u5c02\u7528\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u30c4\u30fc\u30eb\u306e\u4f7f\u7528\u304c\u5f53\u305f\u308a\u524d\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>RVM<\/h3>\n<p>Cloud9\u3067\u6a19\u6e96\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u3002<\/p>\n<h3>rbenv<\/h3>\n<p>\u3053\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u30c4\u30fc\u30eb\u304c\u6700\u3082\u3088\u304f\u4f7f\u308f\u308c\u3066\u3044\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u30c4\u30fc\u30eb\u3067\u3059\u3002<\/p>\n<h4>versions\u30d5\u30a9\u30eb\u30c0<\/h4>\n<p><span style=\"color: #ff0000;\"><strong>rbenv\u304c\u30d0\u30fc\u30b8\u30e7\u30f3\u3054\u3068\u306b\u30b3\u30de\u30f3\u30c9\u3092\u914d\u7f6e\u3057\u3066\u304a\u304f\u30d5\u30a9\u30eb\u30c0<\/strong><\/span>\u3067\u3059\u3002\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u5207\u308a\u66ff\u3048\u305f\u5834\u5408\u306f\u3053\u3061\u3089\u306e\u30d5\u30a9\u30eb\u30c0\u306b\u5165\u3063\u3066\u3044\u308b\u30b3\u30de\u30f3\u30c9\u3092\u5207\u308a\u66ff\u3048\u3066\u4f7f\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4>shims(rbenv rehash)\u30d5\u30a9\u30eb\u30c0<\/h4>\n<p>ruby\u3084rails\u3084gem\u7b49\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u4f7f\u3048\u308b\u30b3\u30de\u30f3\u30c9(irb, gem, rake, rails, ruby\u306a\u3069)\u3092\u30d0\u30fc\u30b8\u30e7\u30f3\u6bce\u306b\u632f\u308a\u5206\u3051\u308b\u30d5\u30a9\u30eb\u30c0\u3067\u3059\u3002<\/p>\n<h4>\u30b3\u30de\u30f3\u30c9<\/h4>\n<h5>rbenv install -l<\/h5>\n<p>rbenv\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u308bRuby\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u4e00\u89a7\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<h5>rbenv install (\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308bRuby\u30d0\u30fc\u30b8\u30e7\u30f3)<\/h5>\n<p>\u6307\u5b9a\u3057\u305fRuby\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<h5>rbenv rehash<\/h5>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305fRuby\u3092\u5207\u308a\u66ff\u3048\u53ef\u80fd\u306a\u72b6\u614b\u306b\u3057\u307e\u3059\u3002<\/p>\n<h5>rbenv versions<\/h5>\n<p>\u5207\u308a\u66ff\u3048\u53ef\u80fd\u306aRuby\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u4e00\u89a7\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<h2>rbenv global (\u4f7f\u3044\u305f\u3044Ruby\u306e\u30d0\u30fc\u30b8\u30e7\u30f3)<\/h2>\n<p>\u4f7f\u3044\u305f\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306eRuby\u306b\u5207\u308a\u66ff\u3048\u307e\u3059\u3002\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306fsystem\u3068\u3044\u3046Ruby\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002\uff09<\/p>\n<h2>\u6b63\u898f\u8868\u73fe\u306e\u4fbf\u5229\u30c4\u30fc\u30eb(Rubular)<\/h2>\n<p>Ruby\u306b\u304a\u3044\u3066\u3082\u3001\u6b63\u898f\u8868\u73fe\u3092\u3082\u3061\u308d\u3093\u4f7f\u3046\u3053\u3068\u306f\u3067\u304d\u307e\u3059\u304c\u3001\u300cRubular\u300d\u3068\u3044\u3046\u30aa\u30f3\u30e9\u30a4\u30f3\u306e\u4fbf\u5229\u30c4\u30fc\u30eb\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>http:\/\/rubular.com\/<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-4181\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/06\/Rubular.png\" alt=\"\" width=\"1081\" height=\"438\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/06\/Rubular.png 1081w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/06\/Rubular-300x122.png 300w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/06\/Rubular-768x311.png 768w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/06\/Rubular-1024x415.png 1024w\" sizes=\"(max-width: 1081px) 100vw, 1081px\" \/><\/p>\n<p>\u3053\u306e\u30c4\u30fc\u30eb\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u81ea\u5206\u3067\u4f5c\u3063\u305f\u6b63\u898f\u8868\u73fe\u3067\u6587\u5b57\u5217\u306e\u3069\u3053\u304c\u30de\u30c3\u30c1\u3057\u3066\u3044\u308b\u304b\u3001\u8996\u899a\u7684\u306b\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3001\u672a\u7136\u306b\u30d0\u30b0\u3092\u9632\u3050\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Ruby\u3068\u306f\uff1f 1996\u5e74\u306b\u65e5\u672c\u4eba\u30d7\u30ed\u30b0\u30e9\u30de\u30fc\u306e\u307e\u3064\u3082\u3068\u3086\u304d\u3072\u308d\u6c0f\u306b\u3088\u3063\u3066\u516c\u958b\u3055\u308c\u305f\u300c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u8a00\u8a9e\u300d\u306b\u306a\u308a\u307e\u3059\u3002 Ruby\u306f\u69cb\u6587\u306b\u3001\u69d8\u3005\u306a\u5de5\u592b\u304c\u51dd\u3089\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u30d7\u30ed\u30b0\u30e9\u30de\u304c\u66f8\u3044\u3066\u3044\u3066\u3001\u975e\u5e38\u306b\u697d\u3057\u3044 [&hellip;]","protected":false},"author":1,"featured_media":4232,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[48],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/4178"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4178"}],"version-history":[{"count":6,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/4178\/revisions"}],"predecessor-version":[{"id":20483,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/4178\/revisions\/20483"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/media\/4232"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4178"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}