{"id":156,"date":"2016-06-16T17:59:37","date_gmt":"2016-06-16T08:59:37","guid":{"rendered":"http:\/\/windabaft.co.jp\/blog_ceo\/?p=156"},"modified":"2016-06-16T17:59:37","modified_gmt":"2016-06-16T08:59:37","slug":"centos6-7%e3%81%a7rails%e3%81%abmysql%e3%82%92%e5%b0%8e%e5%85%a5%e3%81%99%e3%82%8b%e3%81%a8%e3%81%8d","status":"publish","type":"post","link":"https:\/\/windabaft.co.jp\/blog_ceo\/?p=156","title":{"rendered":"CentOS6.7\u3067Rails\u306bMysql\u3092\u5c0e\u5165\u3059\u308b\u3068\u304d"},"content":{"rendered":"<p>\u3010\u958b\u767a\u74b0\u5883\u3011<br \/>\nCentOS 6.7 (Final)<br \/>\nRuby 2.3.0<br \/>\nRails 4.2.6<br \/>\nMySQL 5.6.29<\/p>\n<p>Rails\u30c7\u30d5\u30a9\u30eb\u30c8\u306eSqlite3\u3067\u306f\u306a\u304fMySQL\u4f7f\u3044\u305f\u3044\u5834\u5408\u3001<\/p>\n<p>$ rails new \u540d\u524d &#8211;skip-bundle -d mysql<\/p>\n<p>Gemfile\u3092\u898b\u3066\u307f\u308b\u3002<\/p>\n<p>$ cd \u540d\u524d<br \/>\n$ vi Gemfile<\/p>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3060\u3068sqlite\u306b\u306a\u3063\u3066\u3044\u308b\u7b87\u6240\u304c\u3001mysql\u306b\u5909\u66f4\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3064\u3044\u3067\u306b\u3001\u4e0b\u8a18\u306e\u30b3\u30e1\u30f3\u30c8\u3092\u5916\u3057\u307e\u3059\u3002<br \/>\n# gem &#8216;therubyracer&#8217;<br \/>\n\u2193<br \/>\ngem &#8216;therubyracer&#8217;<br \/>\n\uff08\u203bjavascript\u306eruntime\u4e0d\u8db3\u30a8\u30e9\u30fc\u9632\u6b62\uff09<\/p>\n<p>\u4fdd\u5b58\u3057\u3066\u3001<br \/>\n$ bundle install<\/p>\n<p>$ rake db:create<br \/>\n\u3067\u3001\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u3001\u304b\u3064<\/p>\n<p>$ gem install mysql2 -v 0.4.4<br \/>\n\u3057\u3066\u3082\u30a8\u30e9\u30fc\u304c\u51fa\u308b\u5834\u5408<\/p>\n<p>$ yum install mysql-devel<br \/>\n\u2193<br \/>\n$ gem install mysql2<br \/>\n\u3053\u3053\u307e\u3067\u9806\u8abf\u306b\u9032\u3081\u3070\uff2f\uff2b\u3067\u3001\uff24\uff22\u4f5c\u6210\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044<br \/>\nrake db:create<\/p>\n<p>\uff24\uff22\u4f5c\u6210\u3067\u304d\u308c\u3070\u6210\u529f\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010\u958b\u767a\u74b0\u5883\u3011 CentOS 6.7 (Final) Ruby 2.3.0 Rails 4.2.6 MySQL 5.6.29 Rails\u30c7\u30d5\u30a9\u30eb\u30c8\u306eSqlite3\u3067\u306f\u306a\u304fMySQL\u4f7f\u3044\u305f\u3044\u5834\u5408\u3001 $ rails new \u540d &hellip; <a href=\"https:\/\/windabaft.co.jp\/blog_ceo\/?p=156\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">CentOS6.7\u3067Rails\u306bMysql\u3092\u5c0e\u5165\u3059\u308b\u3068\u304d<\/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":[6],"tags":[],"class_list":["post-156","post","type-post","status-publish","format-standard","hentry","category-rubyrails"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/windabaft.co.jp\/blog_ceo\/index.php?rest_route=\/wp\/v2\/posts\/156","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=156"}],"version-history":[{"count":1,"href":"https:\/\/windabaft.co.jp\/blog_ceo\/index.php?rest_route=\/wp\/v2\/posts\/156\/revisions"}],"predecessor-version":[{"id":157,"href":"https:\/\/windabaft.co.jp\/blog_ceo\/index.php?rest_route=\/wp\/v2\/posts\/156\/revisions\/157"}],"wp:attachment":[{"href":"https:\/\/windabaft.co.jp\/blog_ceo\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/windabaft.co.jp\/blog_ceo\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/windabaft.co.jp\/blog_ceo\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}