{"action":"created","issue":{"url":"https://api.github.com/repos/brianmario/mysql2/issues/861","repository_url":"https://api.github.com/repos/brianmario/mysql2","labels_url":"https://api.github.com/repos/brianmario/mysql2/issues/861/labels{/name}","comments_url":"https://api.github.com/repos/brianmario/mysql2/issues/861/comments","events_url":"https://api.github.com/repos/brianmario/mysql2/issues/861/events","html_url":"https://github.com/brianmario/mysql2/issues/861","id":238310215,"number":861,"title":"cannot load such file -- mysql2/2.4/mysql2 (LoadError)`","user":{"login":"araufit","id":29669465,"avatar_url":"https://avatars2.githubusercontent.com/u/29669465?v=4","gravatar_id":"","url":"https://api.github.com/users/araufit","html_url":"https://github.com/araufit","followers_url":"https://api.github.com/users/araufit/followers","following_url":"https://api.github.com/users/araufit/following{/other_user}","gists_url":"https://api.github.com/users/araufit/gists{/gist_id}","starred_url":"https://api.github.com/users/araufit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/araufit/subscriptions","organizations_url":"https://api.github.com/users/araufit/orgs","repos_url":"https://api.github.com/users/araufit/repos","events_url":"https://api.github.com/users/araufit/events{/privacy}","received_events_url":"https://api.github.com/users/araufit/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/brianmario/mysql2/milestones/11","html_url":"https://github.com/brianmario/mysql2/milestone/11","labels_url":"https://api.github.com/repos/brianmario/mysql2/milestones/11/labels","id":1235595,"number":11,"title":"0.5.0","description":"","creator":{"login":"sodabrew","id":39406,"avatar_url":"https://avatars3.githubusercontent.com/u/39406?v=4","gravatar_id":"","url":"https://api.github.com/users/sodabrew","html_url":"https://github.com/sodabrew","followers_url":"https://api.github.com/users/sodabrew/followers","following_url":"https://api.github.com/users/sodabrew/following{/other_user}","gists_url":"https://api.github.com/users/sodabrew/gists{/gist_id}","starred_url":"https://api.github.com/users/sodabrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sodabrew/subscriptions","organizations_url":"https://api.github.com/users/sodabrew/orgs","repos_url":"https://api.github.com/users/sodabrew/repos","events_url":"https://api.github.com/users/sodabrew/events{/privacy}","received_events_url":"https://api.github.com/users/sodabrew/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":28,"state":"closed","created_at":"2015-07-31T18:59:09Z","updated_at":"2018-03-21T00:40:53Z","due_on":null,"closed_at":"2018-03-21T00:40:53Z"},"comments":16,"created_at":"2017-06-24T10:43:20Z","updated_at":"2018-03-27T19:18:48Z","closed_at":"2017-11-25T23:06:11Z","author_association":"NONE","body":"I am new on Ruby on Rails. My Ruby version is ruby2.4.1p111 (2017-03-22 revision 58053) [x64-mingw32].\r\n\r\nI have created a new project using rails new sample_cms -d mysql command.\r\n\r\nThe command rails server is throwing following error.\r\n\r\nC:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/mysql2-0.4.6-x64-mingw32/lib/mysql2/mysql2.rb:2:inrequire': cannot load such file -- mysql2/2.4/mysql2 (LoadError)`\r\nI have installed mysql and mysql Connector C. I have installed the mysql2 gem like that.\r\n\r\ngem install mysql2 —platform=ruby — ‘—with-mysql-dir=\"C:\\Program Files\\MySQL\\MySQL Connector C 6.1\"’\r\nI have uninstall and install the mysql2 gem but still facing the issue. Here is the directory which may have issue.\r\n\r\n![27505154-7b8f3f4e-58b2-11e7-8c8a-66980553443c](https://user-images.githubusercontent.com/29669465/27507947-932227b0-58f4-11e7-9b5d-11d8707d0d4b.png)\r\n\r\nHere is the gem file entry for mysql2\r\n\r\n# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'\r\ngem 'rails', '~> 5.1.1'\r\n# Use mysql as the database for Active Record\r\ngem 'mysql2', '>= 0.3.18', '< 0.5'\r\n# Use Puma as the app server\r\ngem 'puma', '~> 3.7'\r\nAny Help?"},"comment":{"url":"https://api.github.com/repos/brianmario/mysql2/issues/comments/376643227","html_url":"https://github.com/brianmario/mysql2/issues/861#issuecomment-376643227","issue_url":"https://api.github.com/repos/brianmario/mysql2/issues/861","id":376643227,"user":{"login":"BMahabir","id":1659720,"avatar_url":"https://avatars1.githubusercontent.com/u/1659720?v=4","gravatar_id":"","url":"https://api.github.com/users/BMahabir","html_url":"https://github.com/BMahabir","followers_url":"https://api.github.com/users/BMahabir/followers","following_url":"https://api.github.com/users/BMahabir/following{/other_user}","gists_url":"https://api.github.com/users/BMahabir/gists{/gist_id}","starred_url":"https://api.github.com/users/BMahabir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BMahabir/subscriptions","organizations_url":"https://api.github.com/users/BMahabir/orgs","repos_url":"https://api.github.com/users/BMahabir/repos","events_url":"https://api.github.com/users/BMahabir/events{/privacy}","received_events_url":"https://api.github.com/users/BMahabir/received_events","type":"User","site_admin":false},"created_at":"2018-03-27T19:18:48Z","updated_at":"2018-03-27T19:18:48Z","author_association":"NONE","body":"Sigh well it doesn't work for me....\r\n\r\nC:\\rails_project\\market-tracker>gem install mysql2 --platform=ruby -- '--with-mysql-lib=\"C:\\mysql-connector-C-61\\lib\" --with-mysql-include=\"C:\\mysql-connector-C-61\\include\"'\r\nTemporarily enhancing PATH for MSYS/MINGW...\r\nInstalling required msys2 packages: mingw-w64-x86_64-libmariadbclient\r\nwarning: mingw-w64-x86_64-libmariadbclient-2.3.4-1 is up to date -- skipping\r\nBuilding native extensions with: '--with-mysql-lib=\"C:\\mysql-connector-C-61\\lib\" --with-mysql-include=\"C:\\mysql-connector-C-61\\include\"'\r\nThis could take a while...\r\nERROR:  Error installing mysql2:\r\n        ERROR: Failed to build gem native extension.\r\n\r\n    current directory: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/mysql2-0.5.0/ext/mysql2\r\nC:/Ruby24-x64/bin/ruby.exe -r ./siteconf20180327-9056-1hzh8yu.rb extconf.rb --with-mysql-lib=\"C:\\mysql-connector-C-61\\lib\" --with-mysql-include=\"C:\\mysql-connector-C-61\\include\"\r\nchecking for rb_absint_size()... yes\r\nchecking for rb_absint_singlebit_p()... yes\r\nchecking for rb_wait_for_single_fd()... yes\r\n-----\r\nUsing --with-mysql-dir=C:\\mysql-connector-C-61\r\n-----\r\nchecking for mysql.h... yes\r\nchecking for errmsg.h... yes\r\nchecking for SSL_MODE_DISABLED in mysql.h... yes\r\nchecking for SSL_MODE_PREFERRED in mysql.h... yes\r\nchecking for SSL_MODE_REQUIRED in mysql.h... yes\r\nchecking for SSL_MODE_VERIFY_CA in mysql.h... yes\r\nchecking for SSL_MODE_VERIFY_IDENTITY in mysql.h... yes\r\nchecking for MYSQL.net.vio in mysql.h... yes\r\nchecking for MYSQL.net.pvio in mysql.h... no\r\nchecking for MYSQL_ENABLE_CLEARTEXT_PLUGIN in mysql.h... yes\r\nchecking for SERVER_QUERY_NO_GOOD_INDEX_USED in mysql.h... yes\r\nchecking for SERVER_QUERY_NO_INDEX_USED in mysql.h... yes\r\nchecking for SERVER_QUERY_WAS_SLOW in mysql.h... yes\r\nchecking for MYSQL_OPTION_MULTI_STATEMENTS_ON in mysql.h... yes\r\nchecking for MYSQL_OPTION_MULTI_STATEMENTS_OFF in mysql.h... yes\r\nchecking for my_bool in mysql.h... yes\r\ncreating Makefile\r\n\r\ncurrent directory: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/mysql2-0.5.0/ext/mysql2\r\nmake \"DESTDIR=\" clean\r\n\r\ncurrent directory: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/mysql2-0.5.0/ext/mysql2\r\nmake \"DESTDIR=\"\r\ngenerating mysql2-x64-mingw32.def\r\ncompiling client.c\r\ncompiling infile.c\r\ncompiling mysql2_ext.c\r\ncompiling result.c\r\ncompiling statement.c\r\nlinking shared-object mysql2/mysql2.so\r\nclient.o:client.c:(.text+0x1d0): undefined reference to `mysql_send_query'\r\nclient.o:client.c:(.text+0x224): undefined reference to `mysql_real_connect'\r\nclient.o:client.c:(.text+0x2a9): undefined reference to `mysql_options4'\r\nclient.o:client.c:(.text+0x2cd): undefined reference to `mysql_init'\r\nclient.o:client.c:(.text+0x38f): undefined reference to `mysql_options'\r\nclient.o:client.c:(.text+0x3c4): undefined reference to `mysql_options'\r\nclient.o:client.c:(.text+0x3d5): undefined reference to `mysql_error'\r\nclient.o:client.c:(.text+0x416): undefined reference to `mysql_options'\r\nclient.o:client.c:(.text+0x446): undefined reference to `mysql_options'\r\nclient.o:client.c:(.text+0x7a3): undefined reference to `mysql_ssl_set'\r\nclient.o:client.c:(.text+0x7e0): undefined reference to `mysql_get_ssl_cipher'\r\nclient.o:client.c:(.text+0x830): undefined reference to `mysql_info'\r\nclient.o:client.c:(.text+0x87b): undefined reference to `mysql_warning_count'\r\nclient.o:client.c:(.text+0x8ad): undefined reference to `mysql_use_result'\r\nclient.o:client.c:(.text+0x8cd): undefined reference to `mysql_store_result'\r\nclient.o:client.c:(.text+0x8fb): undefined reference to `mysql_more_results'\r\nclient.o:client.c:(.text+0x93a): undefined reference to `mysql_set_server_option'\r\nclient.o:client.c:(.text+0x96c): undefined reference to `mysql_select_db'\r\nclient.o:client.c:(.text+0x985): undefined reference to `mysql_ping'\r\nclient.o:client.c:(.text+0x9a5): undefined reference to `mysql_read_query_result'\r\nclient.o:client.c:(.text+0xa1d): undefined reference to `mysql_get_server_version'\r\nclient.o:client.c:(.text+0xa3d): undefined reference to `mysql_get_server_info'\r\nclient.o:client.c:(.text+0xb7c): undefined reference to `mysql_real_escape_string'\r\nclient.o:client.c:(.text+0xc6a): undefined reference to `mysql_escape_string'\r\nclient.o:client.c:(.text+0xd40): undefined reference to `mysql_get_client_info'\r\nclient.o:client.c:(.text+0xd84): undefined reference to `mysql_get_client_version'\r\nclient.o:client.c:(.text+0xe02): undefined reference to `mysql_error'\r\nclient.o:client.c:(.text+0xe15): undefined reference to `mysql_sqlstate'\r\nclient.o:client.c:(.text+0xe48): undefined reference to `mysql_errno'\r\nclient.o:client.c:(.text+0x10f4): undefined reference to `mysql_options'\r\nclient.o:client.c:(.text+0x1188): undefined reference to `mysql_options'\r\nclient.o:client.c:(.text+0x1205): undefined reference to `mysql_get_server_version'\r\nclient.o:client.c:(.text+0x1253): undefined reference to `mysql_options'\r\nclient.o:client.c:(.text+0x1276): undefined reference to `mysql_options'\r\nclient.o:client.c:(.text+0x131a): undefined reference to `mysql_errno'\r\nclient.o:client.c:(.text+0x135b): undefined reference to `mysql_next_result'\r\nclient.o:client.c:(.text+0x13c5): undefined reference to `mysql_next_result'\r\nclient.o:client.c:(.text+0x13e8): undefined reference to `mysql_more_results'\r\nclient.o:client.c:(.text+0x1404): undefined reference to `mysql_free_result'\r\nclient.o:client.c:(.text+0x144f): undefined reference to `mysql_thread_id'\r\nclient.o:client.c:(.text+0x152f): undefined reference to `mysql_affected_rows'\r\nclient.o:client.c:(.text+0x15af): undefined reference to `mysql_insert_id'\r\nclient.o:client.c:(.text+0x162d): undefined reference to `mysql_get_client_version'\r\nclient.o:client.c:(.text+0x166f): undefined reference to `mysql_options'\r\nclient.o:client.c:(.text+0x1716): undefined reference to `mysql_close'\r\nclient.o:client.c:(.text+0x1774): undefined reference to `mysql_close'\r\nclient.o:client.c:(.text+0x1872): undefined reference to `mysql_options'\r\nclient.o:client.c:(.text+0x187f): undefined reference to `mysql_error'\r\nclient.o:client.c:(.text+0x1bb5): undefined reference to `mysql_get_client_info'\r\nclient.o:client.c:(.text+0x1c1a): undefined reference to `mysql_server_init'\r\nclient.o:client.c:(.text+0x2eb6): undefined reference to `mysql_errno'\r\ninfile.o:infile.c:(.text+0x21b): undefined reference to `mysql_set_local_infile_handler'\r\nresult.o:result.c:(.text+0x7e): undefined reference to `mysql_stmt_num_rows'\r\nresult.o:result.c:(.text+0xb5): undefined reference to `mysql_num_rows'\r\nresult.o:result.c:(.text+0x13b): undefined reference to `mysql_fetch_field_direct'\r\nresult.o:result.c:(.text+0x195): undefined reference to `mysql_num_fields'\r\nresult.o:result.c:(.text+0x295): undefined reference to `mysql_num_fields'\r\nresult.o:result.c:(.text+0x2f5): undefined reference to `mysql_stmt_fetch'\r\nresult.o:result.c:(.text+0x397): undefined reference to `mysql_free_result'\r\nresult.o:result.c:(.text+0x3d5): undefined reference to `mysql_stmt_free_result'\r\nresult.o:result.c:(.text+0x6db): undefined reference to `mysql_fetch_fields'\r\nresult.o:result.c:(.text+0x76f): undefined reference to `mysql_error'\r\nresult.o:result.c:(.text+0x7c9): undefined reference to `mysql_fetch_fields'\r\nresult.o:result.c:(.text+0x8c8): undefined reference to `mysql_data_seek'\r\nresult.o:result.c:(.text+0x942): undefined reference to `mysql_stmt_num_rows'\r\nresult.o:result.c:(.text+0xa05): undefined reference to `mysql_num_rows'\r\nresult.o:result.c:(.text+0xbef): undefined reference to `mysql_stmt_bind_result'\r\nresult.o:result.c:(.text+0xee8): undefined reference to `mysql_num_fields'\r\nresult.o:result.c:(.text+0x191f): undefined reference to `mysql_fetch_lengths'\r\nresult.o:result.c:(.text+0x22fe): undefined reference to `mysql_num_fields'\r\nresult.o:result.c:(.text+0x2b1): undefined reference to `mysql_fetch_row'\r\nstatement.o:statement.c:(.text+0x12): undefined reference to `mysql_stmt_close'\r\nstatement.o:statement.c:(.text+0x40): undefined reference to `mysql_stmt_prepare'\r\nstatement.o:statement.c:(.text+0x85): undefined reference to `mysql_stmt_execute'\r\nstatement.o:statement.c:(.text+0x137): undefined reference to `mysql_stmt_insert_id'\r\nstatement.o:statement.c:(.text+0x197): undefined reference to `mysql_stmt_field_count'\r\nstatement.o:statement.c:(.text+0x207): undefined reference to `mysql_stmt_param_count'\r\nstatement.o:statement.c:(.text+0x25e): undefined reference to `mysql_stmt_close'\r\nstatement.o:statement.c:(.text+0x298): undefined reference to `mysql_stmt_close'\r\nstatement.o:statement.c:(.text+0x2e8): undefined reference to `mysql_stmt_error'\r\nstatement.o:statement.c:(.text+0x2fc): undefined reference to `mysql_stmt_sqlstate'\r\nstatement.o:statement.c:(.text+0x35b): undefined reference to `mysql_stmt_errno'\r\nstatement.o:statement.c:(.text+0x3e7): undefined reference to `mysql_stmt_affected_rows'\r\nstatement.o:statement.c:(.text+0x4aa): undefined reference to `mysql_stmt_result_metadata'\r\nstatement.o:statement.c:(.text+0x4be): undefined reference to `mysql_fetch_fields'\r\nstatement.o:statement.c:(.text+0x4c9): undefined reference to `mysql_stmt_field_count'\r\nstatement.o:statement.c:(.text+0x528): undefined reference to `mysql_free_result'\r\nstatement.o:statement.c:(.text+0x544): undefined reference to `mysql_stmt_errno'\r\nstatement.o:statement.c:(.text+0x625): undefined reference to `mysql_stmt_param_count'\r\nstatement.o:statement.c:(.text+0x815): undefined reference to `mysql_stmt_result_metadata'\r\nstatement.o:statement.c:(.text+0x885): undefined reference to `mysql_stmt_store_result'\r\nstatement.o:statement.c:(.text+0x9ed): undefined reference to `mysql_stmt_bind_param'\r\nstatement.o:statement.c:(.text+0xbd4): undefined reference to `mysql_stmt_errno'\r\nstatement.o:statement.c:(.text+0x103a): undefined reference to `mysql_free_result'\r\nstatement.o:statement.c:(.text+0x110c): undefined reference to `mysql_stmt_init'\r\nstatement.o:statement.c:(.text+0x113c): undefined reference to `mysql_stmt_attr_set'\r\ncollect2.exe: error: ld returned 1 exit status\r\nmake: *** [Makefile:259: mysql2.so] Error 1\r\n\r\nmake failed, exit code 2\r\n\r\nGem files will remain installed in C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/mysql2-0.5.0 for inspection.\r\nResults logged to C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/mysql2-0.5.0/gem_make.out"}}
{"actor":{"display_login":"BMahabir"}}