{"id":228,"date":"2013-12-13T23:17:29","date_gmt":"2013-12-13T14:17:29","guid":{"rendered":"http:\/\/www.uturtle.com\/blog\/?p=228"},"modified":"2014-05-10T23:44:59","modified_gmt":"2014-05-10T14:44:59","slug":"%ec%9c%88%eb%8f%84%ec%9a%b0%ec%97%90%ec%84%9c-mysql2-ruby-gem%ec%9d%b4-%ec%84%a4%ec%b9%98%ea%b0%80-%ec%95%88%eb%90%a0-%ea%b2%bd%ec%9a%b0-%ed%95%b4%ea%b2%b0%eb%b0%a9%eb%b2%95","status":"publish","type":"post","link":"https:\/\/www.jinukbaek.com\/blog\/ko\/archives\/228","title":{"rendered":"\uc708\ub3c4\uc6b0\uc5d0\uc11c &#8220;mysql2 ruby gem&#8221;\uc774 \uc124\uce58\uac00 \uc548\ub420 \uacbd\uc6b0 \ud574\uacb0\ubc29\ubc95"},"content":{"rendered":"<p>\uc708\ub3c4\uc6b0\uc5d0\uc11c mysql2 ruby gem\uc774 \uc544\ub798\uc640 \uc720\uc0ac\ud55c \uc774\uc720\ub85c \uc124\uce58\uac00 \uc548\ub418\ub294 \uacbd\uc6b0 \ud574\uacb0\ubc29\ubc95. (rails4, ruby2 \uc5d0\uc11c \ud655\uc778)<\/p>\n<table style=\"background-color: #eafbfe; border-width: 1px;\" border=\"1\" frame=\"box\">\n<tbody>\n<tr>\n<td>Building native extensions. This could take a while&#8230;<br \/>\nERROR: Error installing mysql2:<br \/>\nERROR: Failed to build gem native extension.C:\/Ruby200-x64\/bin\/ruby.exe extconf.rb<br \/>\nchecking for ruby\/thread.h&#8230; yes<br \/>\nchecking for rb_thread_call_without_gvl() in ruby\/thread.h&#8230; yes<br \/>\nchecking for rb_thread_blocking_region()&#8230; yes<br \/>\nchecking for rb_wait_for_single_fd()&#8230; yes<br \/>\nchecking for rb_hash_dup()&#8230; yes<br \/>\nchecking for rb_intern3()&#8230; yes<br \/>\nchecking for mysql_query() in -lmysqlclient&#8230; no<br \/>\nchecking for main() in -lm&#8230; yes<br \/>\nchecking for mysql_query() in -lmysqlclient&#8230; no<br \/>\nchecking for main() in -lz&#8230; no<br \/>\nchecking for mysql_query() in -lmysqlclient&#8230; no<br \/>\nchecking for main() in -lsocket&#8230; no<br \/>\nchecking for mysql_query() in -lmysqlclient&#8230; no<br \/>\nchecking for main() in -lnsl&#8230; no<br \/>\nchecking for mysql_query() in -lmysqlclient&#8230; no<br \/>\nchecking for main() in -lmygcc&#8230; no<br \/>\nchecking for mysql_query() in -lmysqlclient&#8230; no<br \/>\n*** extconf.rb failed ***<br \/>\nCould not create Makefile due to some reason, probably lack of necessary libraries and\/or headers. Check the mkmf.log file for more details. You may need configuration options.<\/p>\n<p>Provided configuration options:<br \/>\n&#8211;with-opt-dir<br \/>\n&#8211;without-opt-dir<br \/>\n&#8211;with-opt-include<br \/>\n&#8211;without-opt-include=${opt-dir}\/include<br \/>\n&#8211;with-opt-lib<br \/>\n&#8211;without-opt-lib=${opt-dir}\/lib<br \/>\n&#8211;with-make-prog<br \/>\n&#8211;without-make-prog<br \/>\n&#8211;srcdir=.<br \/>\n&#8211;curdir<br \/>\n&#8211;ruby=C:\/Ruby200-x64\/bin\/ruby<br \/>\n&#8211;with-mysql-dir<br \/>\n&#8211;without-mysql-dir<br \/>\n&#8211;with-mysql-include<br \/>\n&#8211;without-mysql-include=${mysql-dir}\/include<br \/>\n&#8211;with-mysql-lib<br \/>\n&#8211;without-mysql-lib=${mysql-dir}\/<br \/>\n&#8211;with-mysql-config<br \/>\n&#8211;without-mysql-config<br \/>\n&#8211;with-mysql-dir<br \/>\n&#8211;without-mysql-dir<br \/>\n&#8211;with-mysql-include<br \/>\n&#8211;without-mysql-include=${mysql-dir}\/include<br \/>\n&#8211;with-mysql-lib<br \/>\n&#8211;without-mysql-lib=${mysql-dir}\/<br \/>\n&#8211;with-mysqlclientlib<br \/>\n&#8211;without-mysqlclientlib<br \/>\n&#8211;with-mlib<br \/>\n&#8211;without-mlib<br \/>\n&#8211;with-mysqlclientlib<br \/>\n&#8211;without-mysqlclientlib<br \/>\n&#8211;with-zlib<br \/>\n&#8211;without-zlib<br \/>\n&#8211;with-mysqlclientlib<br \/>\n&#8211;without-mysqlclientlib<br \/>\n&#8211;with-socketlib<br \/>\n&#8211;without-socketlib<br \/>\n&#8211;with-mysqlclientlib<br \/>\n&#8211;without-mysqlclientlib<br \/>\n&#8211;with-nsllib<br \/>\n&#8211;without-nsllib<br \/>\n&#8211;with-mysqlclientlib<br \/>\n&#8211;without-mysqlclientlib<br \/>\n&#8211;with-mygcclib<br \/>\n&#8211;without-mygcclib<br \/>\n&#8211;with-mysqlclientlib<br \/>\n&#8211;without-mysqlclientlib<br \/>\nGem files will remain installed in C:\/Ruby200-x64\/lib\/ruby\/gems\/2.0.0\/gems\/mysql2-0.3.14 for inspection.<br \/>\nResults logged to C:\/Ruby200-x64\/lib\/ruby\/gems\/2.0.0\/gems\/mysql2-0.3.14\/ext\/mysql2\/gem_make.out<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<h2>\u00a01. \uc774 \uc720<\/h2>\n<hr \/>\n<p>1. mysqlclient \ub610\ub294 mysql connector\uac00 \uc124\uce58\ub418\uc5b4 \uc788\uc9c0 \uc54a\uae30 \ub54c\ubb38<\/p>\n<p>2. mysql connector\uac00 \uc124\uce58\ub418\uc5b4 \uc788\ub2e4 \ud558\ub354\ub77c\ub3c4 \uacbd\ub85c \uc9c0\uc815\uc774 \uc548\ub418\uc788\ub294 \uacbd\uc6b0<\/p>\n<p>&nbsp;<\/p>\n<h2>2. \ud574\uacb0\ubc29\ubc95<\/h2>\n<hr \/>\n<p>1) mysql c connector\ub97c \uc124\uce58\ud55c\ub2e4. [<a href=\"http:\/\/dev.mysql.com\/downloads\/connector\/c\/\">http:\/\/dev.mysql.com\/downloads\/connector\/c\/<\/a>] (\uc124\uce58\ub418\uc5b4 \uc788\ub294 \uacbd\uc6b0 \uc0dd\ub7b5)<\/p>\n<p>2) \uc544\ub798\uc640 \uac19\uc740 \ubc29\ubc95\uc73c\ub85c \uc124\uce58\ud55c\ub2e4. \uad75\uc740 \uae00\uc528 \ubd80\ubd84\uc740 mysql connector\uac00 \uc124\uce58\ub41c \ud658\uacbd\uc5d0 \ub9de\uac8c \uc218\uc815\ud55c\ub2e4.<\/p>\n<table style=\"background-color: #eafbfe; border-width: 1px;\" border=\"1\" frame=\"box\">\n<tbody>\n<tr>\n<td>C:\\&gt;gem install mysql2 &#8211;platform=ruby &#8212; &#8216;&#8211;with-mysql-lib=&#8221;<strong>C:\\Program Files\\MySQL\\MySQL Connector C 6.1<\/strong>\\lib&#8221; &#8211;with-mysql-include=&#8221;<strong>C:\\Program Files\\MySQL\\MySQL Connector C 6.1\\<\/strong>include&#8221;&#8216;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<h3>Reference<\/h3>\n<p>[1]\u00a0<a href=\"http:\/\/stackoverflow.com\/questions\/5836959\/cant-install-mysql2-for-rails-3-on-windows\">http:\/\/stackoverflow.com\/questions\/5836959\/cant-install-mysql2-for-rails-3-on-windows<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc708\ub3c4\uc6b0\uc5d0\uc11c mysql2 ruby gem\uc774 \uc544\ub798\uc640 \uc720\uc0ac\ud55c \uc774\uc720\ub85c \uc124\uce58\uac00 \uc548\ub418\ub294 \uacbd\uc6b0 \ud574\uacb0\ubc29\ubc95. (rails4, ruby2 \uc5d0\uc11c \ud655\uc778) Building native extensions.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[135],"tags":[115,116],"class_list":["post-228","post","type-post","status-publish","format-standard","hentry","category-ruby-on-rails","tag-mysql2-ruby-gem","tag-windows"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8gT1J-3G","_links":{"self":[{"href":"https:\/\/www.jinukbaek.com\/blog\/wp-json\/wp\/v2\/posts\/228","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jinukbaek.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jinukbaek.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jinukbaek.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jinukbaek.com\/blog\/wp-json\/wp\/v2\/comments?post=228"}],"version-history":[{"count":11,"href":"https:\/\/www.jinukbaek.com\/blog\/wp-json\/wp\/v2\/posts\/228\/revisions"}],"predecessor-version":[{"id":490,"href":"https:\/\/www.jinukbaek.com\/blog\/wp-json\/wp\/v2\/posts\/228\/revisions\/490"}],"wp:attachment":[{"href":"https:\/\/www.jinukbaek.com\/blog\/wp-json\/wp\/v2\/media?parent=228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jinukbaek.com\/blog\/wp-json\/wp\/v2\/categories?post=228"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jinukbaek.com\/blog\/wp-json\/wp\/v2\/tags?post=228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}