{"id":5622,"date":"2020-07-03T11:36:12","date_gmt":"2020-07-03T02:36:12","guid":{"rendered":"https:\/\/yumishin.com\/?p=5622"},"modified":"2020-07-03T11:36:12","modified_gmt":"2020-07-03T02:36:12","slug":"ruby-version","status":"publish","type":"post","link":"https:\/\/yumishin.com\/?p=5622","title":{"rendered":"Ruby\u3067\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u3046\u307e\u304f\u5207\u308a\u66ff\u308f\u3089\u306a\u3044\u6642"},"content":{"rendered":"<p>\u306f\u3044\u3001Ruby\u3092\u3084\u3063\u3066\u3044\u308b\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u3060\u3044\u3076Ruby\u3092\u89e6\u3063\u3066\u304d\u305f\u3064\u3082\u308a\u3067\u3057\u305f\u304c\u3001\u6700\u521d\u306e\u74b0\u5883\u69cb\u7bc9\u3067\u3064\u307e\u3065\u3044\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002Ruby\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u3046\u307e\u304f\u5207\u308a\u66ff\u308f\u3089\u306a\u3044\u3068\u8a00\u3046\u3082\u306e\u3067\u3059\u3002\u4eca\u56de\u306f\u305d\u306e\u89e3\u6c7a\u7b56\u306b\u3064\u3044\u3066\u7c21\u5358\u306b\u307e\u3068\u3081\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>\u7d50\u8ad6\u306f\u300cPATH\u306e\u8a2d\u5b9a\u306e\u554f\u984c\u300d\u3067\u3059\u3002<\/p>\n<h2 id=\"i-0\">Ruby\u3067\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u3046\u307e\u304f\u5207\u308a\u66ff\u308f\u3089\u306a\u3044\u6642<\/h2>\n<h3 id=\"i-1\">\u72b6\u6cc1<\/h3>\n<p>Ruby\u5b89\u5b9a\u7248\u306e2.7.1\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u30b0\u30ed\u30fc\u30d0\u30eb\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"pre_tag\"><span><i class=\"fa fa-code\"><\/i> \u30b3\u30fc\u30c9<\/span><\/p>\n<pre><code>$ rbenv versions\n  system\n* 2.7.1<\/code><\/pre>\n<\/div>\n<p>\u4e00\u898b\u3059\u308b\u3068\u3046\u307e\u304f\u8a2d\u5b9a\u3067\u304d\u3066\u305d\u3046\u3067\u3059\u304c\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3059\u308b\u30682.7.1\u3067\u306f\u306a\u304f\u30012.6.3\u3068\u8868\u793a\u3055\u308c\u3066\u3044\u3066\u3001\u3046\u307e\u304f\u3044\u3063\u3066\u307e\u305b\u3093\u3002<\/p>\n<div class=\"pre_tag\"><span><i class=\"fa fa-code\"><\/i> \u30b3\u30fc\u30c9<\/span><\/p>\n<pre><code>$ ruby -v\n2.6.3p62<\/code><\/pre>\n<\/div>\n<h3 id=\"i-2\">\u7d50\u8ad6<\/h3>\n<p>PATH\u304c\u3046\u307e\u304f\u901a\u3063\u3066\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u8981\u3059\u308b\u306b\u4f7f\u7528\u3059\u308bRuby\u3092\u304d\u3061\u3093\u3068\u6307\u5b9a\u3067\u304d\u3066\u3044\u306a\u304b\u3063\u305f\u306e\u304c\u539f\u56e0\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b<code>$which ruby<\/code>\u3068\u3057\u3066\u3001\u3069\u306eRuby\u3092\u4f7f\u3063\u3066\u3044\u308b\u304b\u3092\u78ba\u8a8d\u3059\u308b\u3068<\/p>\n<div class=\"pre_tag\"><span><i class=\"fa fa-code\"><\/i> \u30b3\u30fc\u30c9<\/span><\/p>\n<pre><code>$which ruby\n\/usr\/bin\/ruby<\/code><\/pre>\n<\/div>\n<p>\u3068\u8a00\u3046\u5f62\u3002\u30b7\u30b9\u30c6\u30e0\u306b\u6700\u521d\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bRuby\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u672c\u6765\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b<\/p>\n<div class=\"pre_tag\"><span><i class=\"fa fa-code\"><\/i> \u30b3\u30fc\u30c9<\/span><\/p>\n<pre><code>$which ruby\n\/Users\/\u30e6\u30fc\u30b6\u540d\/.rbenv\/shims\/ruby<\/code><\/pre>\n<\/div>\n<p>\u3068\u8868\u793a\u3055\u308c\u306a\u304f\u3066\u306f\u3044\u3051\u307e\u305b\u3093\u3002\u3053\u308c\u3092\u8a2d\u5b9a\u3059\u308b\u306b\u306fPATH\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3 id=\"i-3\">\u89e3\u6c7a\u624b\u9806<\/h3>\n<div class=\"tl\">\n<div class=\"tl-content main-bdr\">\n<div class=\"tl_label\">\u624b\u98061<\/div>\n<div class=\"tl_title\">bash_profile\u3092\u304d\u308c\u3044\u306b\u3059\u308b<\/div>\n<div class=\"tl_main\">\n<p>bash_profile\u3092\u6574\u7406\u3059\u308b\u305f\u3081\u306b<span class=\"haiiro\">$open ~\/.bash_profile<\/span>\u3067\u3001bash_profile\u3092\u30c6\u30ad\u30b9\u30c8\u5f62\u5f0f\u3067\u30aa\u30fc\u30d7\u30f3\u3057\u307e\u3059\u3002\u4f55\u304b\u8a18\u8ff0\u304c\u3042\u3063\u305f\u3089\u524a\u9664\u3057\u307e\u3059\u3002Vim\u3067\u7de8\u96c6\u3057\u3066\u3082OK\u3067\u3059\u3002<\/p>\n<div class=\"memo \">\n<div class=\"memo_ttl dfont\"> MEMO<\/div>\n<p>\u203b\u3082\u3057bash_profile\u3060\u3051\u3067\u306a\u304f\u3001bashrc\u3084zshrc\u306a\u3069\u304c\u3042\u308b\u5834\u5408\u3082\u30011\u5ea6\u78ba\u8a8d\u3057\u3066\u8a18\u8ff0\u3092\u3044\u3063\u305f\u3093\u30af\u30ea\u30a2\u3059\u308b\u3053\u3068\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\u3002<\/p><\/div>\n<\/div>\n<div class=\"tl_marker main-bdr main-bc\"><\/div>\n<\/div>\n<div class=\"tl-content main-bdr\">\n<div class=\"tl_label\">\u624b\u98062<\/div>\n<div class=\"tl_title\">bash_profile\u306bPATH\u3092\u8a18\u8ff0\u3059\u308b<\/div>\n<div class=\"tl_main\">\n<p>bash_profile\u306b<span class=\"haiiro\">eval \u201c$(rbenv init -)\u201d<\/span>\u3092\u8a18\u5165\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u3063\u3066Ruby\u306e\u53c2\u7167\u5148\u3092\u30b7\u30b9\u30c6\u30e0\u304b\u3089rbenv\u306eRuby\u306b\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/div>\n<div class=\"tl_marker main-bdr main-bc\"><\/div>\n<\/div>\n<div class=\"tl-content main-bdr\">\n<div class=\"tl_label\">\u624b\u98063<\/div>\n<div class=\"tl_title\">\u5909\u66f4\u5185\u5bb9\u3092\u53cd\u6620\u3059\u308b<\/div>\n<div class=\"tl_main\">bash_profile\u306e\u5909\u66f4\u5185\u5bb9\u3092<span class=\"haiiro\">source ~\/.bash_profile<\/span>\u3067\u53cd\u6620\u3055\u305b\u307e\u3059\u3002<\/div>\n<div class=\"tl_marker main-bdr main-bc\"><\/div>\n<\/div>\n<div class=\"tl-content main-bdr\">\n<div class=\"tl_label\">\u624b\u98064<\/div>\n<div class=\"tl_title\">\u304d\u3061\u3093\u3068\u5909\u66f4\u3055\u308c\u305f\u304b\u78ba\u8a8d\u3059\u308b<\/div>\n<div class=\"tl_main\">\n<p>\u3053\u308c\u3067<span class=\"haiiro\">$ which ruby<\/span>\u3084<span class=\"haiiro\">$echo $PATH<\/span>\u304c\u6b63\u5e38\u306b\u306a\u308b\u306f\u305a\u306a\u306e\u3067\u3001<span class=\"haiiro\">ruby -v<\/span>\u3057\u3066\u307f\u3066\u53c2\u7167\u5148\u3092\u5909\u66f4\u3067\u304d\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<div class=\"pre_tag\"><span><i class=\"fa fa-code\"><\/i> \u30b3\u30fc\u30c9<\/span><\/p>\n<pre><code>$ruby -v\n2.7.1p83\n<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"tl_marker main-bdr main-bc\"><\/div>\n<\/div>\n<\/div>\n<h4 id=\"i-4\">\u307e\u3068\u3081<\/h4>\n<p>\u3068\u8a00\u3046\u308f\u3051\u3067\u3001\u3046\u307e\u304fRuby\u304c\u5207\u308a\u66ff\u308f\u3089\u306a\u3044\u3068\u304d\u306e\u5bfe\u51e6\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3057\u305f\u3002\u6b63\u76f4\u304b\u306a\u308a\u66d6\u6627\u306a\u7406\u89e3\u304c\u591a\u304f\u3066\u3001\u5927\u5909\u3067\u3057\u305f\u3002PATH\u306b\u95a2\u3057\u3066\u306f\u5c11\u3057\u7406\u89e3\u3067\u304d\u305f\u3088\u3046\u306b\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3069\u3093\u3069\u3093\u5148\u306b\u9032\u3093\u3067\u6765\u3061\u3083\u3063\u305f\u306e\u3067\u3001\u307e\u305f1\u304b\u3089\u3057\u3063\u304b\u308a\u3068\u52c9\u5f37\u3057\u306a\u3044\u3068\u306a\u3041\u3068\u601d\u3046\u3053\u306e\u9803\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3044\u3001Ruby\u3092\u3084\u3063\u3066\u3044\u308b\u3082\u306e\u3067\u3059\u3002 \u3060\u3044\u3076Ruby\u3092\u89e6\u3063\u3066\u304d\u305f\u3064\u3082\u308a\u3067\u3057\u305f\u304c\u3001\u6700\u521d\u306e\u74b0\u5883\u69cb\u7bc9\u3067\u3064\u307e\u3065\u3044\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002Ruby\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u3046\u307e\u304f\u5207\u308a\u66ff\u308f\u3089\u306a\u3044\u3068\u8a00\u3046\u3082\u306e\u3067\u3059\u3002\u4eca\u56de\u306f\u305d\u306e\u89e3\u6c7a\u7b56\u306b\u3064\u3044\u3066\u7c21\u5358\u306b\u307e\u3068\u3081\u3066\u304a\u304d &#8230; <\/p>\n","protected":false},"author":1,"featured_media":5629,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[272],"tags":[],"class_list":{"0":"post-5622","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-programing","8":"entry"},"_links":{"self":[{"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/posts\/5622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5622"}],"version-history":[{"count":3,"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/posts\/5622\/revisions"}],"predecessor-version":[{"id":5630,"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/posts\/5622\/revisions\/5630"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/media\/5629"}],"wp:attachment":[{"href":"https:\/\/yumishin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}