{"id":190,"date":"2017-12-20T21:46:12","date_gmt":"2017-12-20T12:46:12","guid":{"rendered":"http:\/\/windabaft.co.jp\/blog_ceo\/?p=190"},"modified":"2018-02-18T00:14:32","modified_gmt":"2018-02-17T15:14:32","slug":"rbenvruby2-3-6%e3%81%ae%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%abruby%e3%81%ae%e3%83%90%e3%83%bc%e3%82%b8%e3%83%a7%e3%83%b3%e7%ae%a1%e7%90%86%ef%bc%89%e3%80%80libcurl%e3%81%ae%e3%82%a2","status":"publish","type":"post","link":"https:\/\/windabaft.co.jp\/blog_ceo\/?p=190","title":{"rendered":"rbenv(Ruby\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\uff09,Ruby2.3.6\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3000libcurl\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3000CentOS 6.7(Final) 32bit"},"content":{"rendered":"<p>CentOS\u306brbenv\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u969b\u306b\u5b9f\u884c\u30e6\u30fc\u30b6\u30fc\u3067\u306a\u3044\u3068<br \/>\n\u300c\u30b3\u30de\u30f3\u30c9\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u300d<br \/>\n\u3068\u306a\u3063\u305f\u306e\u3067\u3001\u5168\u30e6\u30fc\u30b6\u30fc\u3067\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u305f\u624b\u9806\u3092\u3001<br \/>\nRuby\u3092rbenv\u3092\u4f7f\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u6700\u521d\u306e\u3068\u3053\u308d\u304b\u3089\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\n\u307e\u305a\u3001<\/p>\n<p>\u2460Ruby \u3092\u30d3\u30eb\u30c9\u3059\u308b\u74b0\u5883\u3092\u69cb\u7bc9<\/p>\n<pre class=\"lang:default decode:true\"># yum install -y gcc bzip2 openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel<\/pre>\n<p>\u2461rbenv + ruby-build \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\nrbenv \u3067 Ruby \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3046\u306e\u3067 rbenv \u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u300c ruby-build \u300d\u3092\u4f75\u305b\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true\"># git clone git:\/\/github.com\/sstephenson\/rbenv.git ~\/.rbenv\r\n# git clone git:\/\/github.com\/sstephenson\/ruby-build.git ~\/.rbenv\/plugins\/ruby-build\r\n# echo 'export PATH=\"$HOME\/.rbenv\/bin:$PATH\"' &gt;&gt; ~\/.bash_profile\r\n# echo 'eval \"$(rbenv init -)\"' &gt;&gt; ~\/.bash_profile\r\n# source ~\/.bash_profile\r\n# rbenv --version\r\nrbenv 1.1.1-28-gb943955<\/pre>\n<p>\u2462Ruby \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n\u300c rbenv install \u300d\u30b3\u30de\u30f3\u30c9\u3092\u7528\u3044\u3066 Ruby \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<br \/>\n\u300c &#8211;list \u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u6307\u5b9a\u3067\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u53ef\u80fd\u306a Ruby \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u30ea\u30b9\u30c8\u8868\u793a\u3055\u308c\u308b\u3002<\/p>\n<p># rbenv install &#8211;list<br \/>\n# rbenv install 2.3.0<\/p>\n<p>\u3053\u3053\u307e\u3067\u306e\u65b9\u6cd5\u3060\u3068\u3001\u5b9f\u884c\u30e6\u30fc\u30b6\u30fc\u3067\u306a\u3044\u3068\u4e0b\u8a18\u306e\u3088\u3046\u306b\u300c\u30b3\u30de\u30f3\u30c9\u304c\u3042\u308a\u307e\u305b\u3093\u300d\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>[root@localhost ~]# rbenv -v<br \/>\n-bash: rbenv: \u30b3\u30de\u30f3\u30c9\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093<\/p>\n<p>\u3053\u306e\u539f\u56e0\u306f\u3000~\/.bash_profile\u3000\u306b\u66f8\u8fbc\u3093\u3067\u3044\u308b\u304b\u3089\u3067\u3001PATH\u304c\u901a\u3063\u3066\u3044\u306a\u3044\u304b\u3089\u3002<br \/>\n\u5b9f\u969b\u306b\u3069\u3053\u306eRuby\u304c\u547c\u3070\u308c\u3066\u3044\u308b\u304b\u3092\u78ba\u8a8d\u3059\u308b\u3068\u3001<br \/>\n# which ruby<br \/>\n\/usr\/bin\/ruby<br \/>\n\u3068\u306a\u3063\u3066\u3044\u3066\u3001rbenv\u306eruby\u3092\u4f7f\u3046\u6642\u306e<br \/>\n\/Users\/\u30e6\u30fc\u30b6\u540d\/.rbenv\/shims\/ruby<\/p>\n<p>CentOS\u3067\u306f\u5168\u30e6\u30fc\u30b6\u30fc\u306b\/etc\/profile.d\/\u304c\u8aad\u307f\u8fbc\u307e\u308c\u308b\u306e\u3067\u3001<br \/>\n\/etc\/profile.d\/\u4ee5\u4e0b\u306brbenv\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3001\u8a2d\u5b9a\u3082\u66f8\u8fbc\u3080\u3088\u3046\u306b\u3059\u308c\u3070\u89e3\u6c7a\u3059\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true \"># sudo su -\r\n# git clone git:\/\/github.com\/sstephenson\/rbenv.git \/usr\/local\/src\/rbenv\r\n# git clone git:\/\/github.com\/sstephenson\/ruby-build.git \/usr\/local\/src\/rbenv\/plugins\/ruby-build\r\n# echo 'export RBENV_ROOT=\"\/usr\/local\/src\/rbenv\"' &gt;&gt; \/etc\/profile.d\/rbenv.sh\r\n# echo 'export PATH=\"${RBENV_ROOT}\/bin:${PATH}\"' &gt;&gt; \/etc\/profile.d\/rbenv.sh\r\n# echo 'eval \"$(rbenv init -)\"' &gt;&gt; \/etc\/profile.d\/rbenv.sh\r\n# source \/etc\/profile.d\/rbenv.sh\r\n# rbenv -v\r\nrbenv 1.1.1-28-gb943955<\/pre>\n<p>&nbsp;<\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u308b\u30ea\u30b9\u30c8\u3092\u8868\u793a\u3057\u3066\u307f\u308b<br \/>\n# rbenv install -l<\/p>\n<p>\u305d\u306e\u4e2d\u306b\u3042\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u9078\u3093\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<br \/>\n# rbenv install -v 2.3.6<\/p>\n<p>&nbsp;<\/p>\n<p>\u304c\u3057\u304b\u3057\u3001CentOS6.7\u3060\u3068\u601d\u308f\u306c\u30c8\u30e9\u30d6\u30eb\u304c\u3055\u3089\u306b\u767a\u751f\u3059\u308b<br \/>\nlibcurl\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u53e4\u3059\u304e\u3066\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30a8\u30e9\u30fc\u3092\u8d77\u3053\u3059\u306e\u3060\u3002<\/p>\n<p>sudo rpm -Uvh http:\/\/www.city-fan.org\/ftp\/contrib\/yum-repo\/city-fan.org-release-1-13.rhel6.noarch.rpm<\/p>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067enabled=1\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u30670\u306b\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:default decode:true \">$ sudo vi \/etc\/yum.repos.d\/city-fan.org.repo\r\n\r\n[city-fan.org]\r\nname=city-fan.org repository for Red Hat Enterprise Linux (and clones) $releasever ($basearch)\r\n#baseurl=http:\/\/mirror.city-fan.org\/ftp\/contrib\/yum-repo\/rhel$releasever\/$basearch\r\nmirrorlist=http:\/\/mirror.city-fan.org\/ftp\/contrib\/yum-repo\/mirrorlist-rhel$releasever\r\n#enabled=1\r\nenabled=0\r\ngpgcheck=1\r\ngpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-city-fan.org<\/pre>\n<p>&nbsp;<\/p>\n<p>&#8211;enablerepo=city-fan.org,epel \u3092\u3064\u3051\u3066libcurl\u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u307e\u3059\u3002<br \/>\n\u203b\u4f9d\u5b58\u95a2\u4fc2\u3067libnghttp2.so.14\u4e0d\u8db3\u304c\u51fa\u308b\u306e\u3092\u9632\u3050\u305f\u3081\u306b<br \/>\nepel<br \/>\n\u3082\u8ffd\u52a0\u3057\u3066\u3001\u3044\u3056\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3002<\/p>\n<p>[root@localhost ~]$ sudo yum update &#8211;enablerepo=city-fan.org,<strong>epel<\/strong> libcurl<\/p>\n<p>\u5b8c\u4e86<\/p>\n<p>\u30d0\u30fc\u30b8\u30e7\u30f3\u78ba\u8a8d\u3059\u308b\u3068<br \/>\n$yum info libcurl<\/p>\n<p>i686<br \/>\n\u30d0\u30fc\u30b8\u30e7\u30f3\uff1a7.57.0<br \/>\n\u306b\u306a\u3063\u3066\u3044\u305f\u306e\u3067\u3001\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u6210\u529f<\/p>\n<p>\u4e2d\u65ad\u3057\u3066\u3044\u305frbenv\u3067Ruby\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n# rbenv install -v 2.3.6<br \/>\n\u3051\u3063\u3053\u3046\u6642\u9593\u304b\u304b\u308a\u307e\u3059\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u7d42\u4e86<\/p>\n<p>\u518d\u8aad\u307f\u8fbc\u307f\u21d2<br \/>\n$ rbenv rehash<\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bruby\u3092\u78ba\u8a8d\u21d2<br \/>\n$ rbenv versions<br \/>\nsystem *2.3.6 (set by \/usr\/local\/src\/rbenv\/version)<\/p>\n<p>\u5148\u307b\u3069\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305fRuby\u306b\u8a2d\u5b9a\u21d2<br \/>\n$ rbenv global 2.3.6<\/p>\n<p>Ruby\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u304b\u3092\u78ba\u8a8d\u21d2<br \/>\n$ ruby -v<br \/>\nruby 2.3.6p384 (2017-12-14 revision 61254) [i686-linux]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CentOS\u306brbenv\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u969b\u306b\u5b9f\u884c\u30e6\u30fc\u30b6\u30fc\u3067\u306a\u3044\u3068 \u300c\u30b3\u30de\u30f3\u30c9\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u300d \u3068\u306a\u3063\u305f\u306e\u3067\u3001\u5168\u30e6\u30fc\u30b6\u30fc\u3067\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u305f\u624b\u9806\u3092\u3001 Ruby\u3092rbenv\u3092\u4f7f\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u6700\u521d\u306e\u3068\u3053\u308d\u304b\u3089\u66f8\u3044\u3066\u307f\u307e &hellip; <a href=\"https:\/\/windabaft.co.jp\/blog_ceo\/?p=190\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">rbenv(Ruby\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\uff09,Ruby2.3.6\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3000libcurl\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3000CentOS 6.7(Final) 32bit<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[15,6],"tags":[],"class_list":["post-190","post","type-post","status-publish","format-standard","hentry","category-linux","category-rubyrails"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/windabaft.co.jp\/blog_ceo\/index.php?rest_route=\/wp\/v2\/posts\/190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/windabaft.co.jp\/blog_ceo\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/windabaft.co.jp\/blog_ceo\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/windabaft.co.jp\/blog_ceo\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/windabaft.co.jp\/blog_ceo\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=190"}],"version-history":[{"count":5,"href":"https:\/\/windabaft.co.jp\/blog_ceo\/index.php?rest_route=\/wp\/v2\/posts\/190\/revisions"}],"predecessor-version":[{"id":299,"href":"https:\/\/windabaft.co.jp\/blog_ceo\/index.php?rest_route=\/wp\/v2\/posts\/190\/revisions\/299"}],"wp:attachment":[{"href":"https:\/\/windabaft.co.jp\/blog_ceo\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/windabaft.co.jp\/blog_ceo\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/windabaft.co.jp\/blog_ceo\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}