Сижу уже наверно дня полтора и делаю все по разным мануалам, но совершенно ничего не выходит. Не могу совсем подключить mysql. постоянно выдает ошибку (rails s) <-[31mCould not find gem 'mysql2 (=0.2.7, runtime)' in any of the gem sources listed in your Gemfile.<-0] . В папке RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems : .... mysql-2.8.1-86x-mingw32 mysql2-0.2.7 mysql2-0.3.6 rails-3.0.7 ... ----------------------------------------- gem list ... mysql-2.8.1-86x-mingw32 .... ---------------------------------------- ------------------------------------------------------- gem 'mysql2', '0.2.7' - Gemfile --------------------------------------------------------- Делал gem install mysql ----------------------------------------------- Делал gem install mysql2 Заканчивается на : Код | C:/RailsInstaller/Ruby1.8.7/bin/ruby.exe extconf.rb checking for rb_thread_blocking_region()... no checking for main() in -llibmysql... no *** extconf.rb failed *** Could 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.
Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=C:/RailsInstaller/Ruby1.8.7/bin/ruby --with-mysql-dir --without-mysql-dir --with-mysql-include --without-mysql-include=${mysql-dir}/include --with-mysql-lib --without-mysql-lib=${mysql-dir}/lib --with-libmysqllib --without-libmysqllib
|
Делал gem install mysql2 -v=0.2.7 -- '--with-mysql-lib="c:\Program Files\MySQL\MySQL Server 5.5\lib" --with-mysql-include="c:\Program Files\MySQL\MySQL Server 5.5\include"' Заканчивается на : Код | C:/RailsInstaller/Ruby1.8.7/bin/ruby.exe extconf.rb --with-mysql-lib="c:\Program Files\MySQL\MySQL Server 5.5\lib" --with-mysql-include="c:\Program Files\MySQL\MySQL Server 5.5\include" checking for rb_thread_blocking_region()... no checking for main() in -llibmysql... yes checking for mysql.h... yes checking for errmsg.h... yes checking for mysqld_error.h... yes creating Makefile
make gcc -I. -I. -IC:/RailsInstaller/Ruby1.8.7/lib/ruby/1.8/i386-mingw32 -I. -DHAVE_MYSQL_H -DHAVE_ERRMSG_H -DHAVE_MYSQLD_ERROR_H "-Ic:\Program Files\MySQL\MySQL Server 5.5\include" -g -O2 -DFD_SETSIZE=256 -Wall -funroll-loops -c client.c client.c: In function 'rb_mysql_client_query': client.c:361:11: warning: unused variable 'r' gcc -I. -I. -IC:/RailsInstaller/Ruby1.8.7/lib/ruby/1.8/i386-mingw32 -I. -DHAVE_MYSQL_H -DHAVE_ERRMSG_H -DHAVE_MYSQLD_ERROR_H "-Ic:\Program Files\MySQL\MySQL Server 5.5\include" -g -O2 -DFD_SETSIZE=256 -Wall -funroll-loops -c mysql2_ext.c ./client.h:16:1: warning: 'rb_thread_blocking_region' defined but not used gcc -I. -I. -IC:/RailsInstaller/Ruby1.8.7/lib/ruby/1.8/i386-mingw32 -I. -DHAVE_MYSQL_H -DHAVE_ERRMSG_H -DHAVE_MYSQLD_ERROR_H "-Ic:\Program Files\MySQL\MySQL Server 5.5\include" -g -O2 -DFD_SETSIZE=256 -Wall -funroll-loops -c result.c gcc -shared -s -o mysql2.so client.o mysql2_ext.o result.o -L. -LC:/RailsInstaller/Ruby1.8.7/lib -L"c:\Program Files\MySQL\MySQL Server 5.5\lib" -L. -Wl,--enable-auto-image-base,--enable-auto-import,--export-all -lmsvcrt-ruby18 -llibmysql -lshell32 -lws2_32 client.o: In function `nogvl_connect': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:111: undefined reference to `mysql_real_connect@32' client.o: In function `nogvl_init': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:102: undefined reference to `mysql_init@4' client.o: In function `set_ssl_options': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:612: undefined reference to `mysql_ssl_set@24' client.o: In function `set_charset_name': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:600: undefined reference to `mysql_options@12' C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:602: undefined reference to `mysql_error@4' client.o: In function `set_connect_timeout': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:571: undefined reference to `mysql_options@12' C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:573: undefined reference to `mysql_error@4' client.o: In function `set_reconnect': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:554: undefined reference to `mysql_options@12' C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:556: undefined reference to `mysql_error@4' client.o: In function `nogvl_ping': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:530: undefined reference to `mysql_ping@4' client.o: In function `rb_mysql_client_thread_id': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:522: undefined reference to `mysql_thread_id@4' client.o: In function `rb_mysql_client_last_id': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:502: undefined reference to `mysql_insert_id@4' client.o: In function `nogvl_store_result': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:242: undefined reference to `mysql_store_result@4' client.o: In function `nogvl_read_query_result': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:234: undefined reference to `mysql_read_query_result@4' client.o: In function `rb_mysql_client_server_info': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:481: undefined reference to `mysql_get_server_version@4' C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:482: undefined reference to `mysql_get_server_info@4' client.o: In function `rb_mysql_client_info': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:454: undefined reference to `mysql_get_client_version@0' C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:455: undefined reference to `mysql_get_client_info@0' client.o: In function `rb_mysql_client_escape': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:422: undefined reference to `mysql_real_escape_string@16' client.o: In function `nogvl_send_query': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:222: undefined reference to `mysql_send_query@12' client.o: In function `nogvl_close': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:148: undefined reference to `mysql_close@4' client.o: In function `rb_raise_mysql2_error': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:77: undefined reference to `mysql_error@4' C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:78: undefined reference to `mysql_sqlstate@4' C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:92: undefined reference to `mysql_errno@4' client.o: In function `rb_mysql_client_affected_rows': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:510: undefined reference to `mysql_affected_rows@4' client.o: In function `rb_mysql_client_async_result': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:266: undefined reference to `mysql_field_count@4' client.o: In function `init_mysql2_client': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/client.c:640: undefined reference to `mysql_get_client_info@0' result.o: In function `rb_mysql_result_fetch_field': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/result.c:82: undefined reference to `mysql_fetch_field_direct@8' C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/result.c:70: undefined reference to `mysql_num_fields@4' result.o: In function `rb_mysql_result_fetch_fields': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/result.c:314: undefined reference to `mysql_num_fields@4' result.o: In function `nogvl_fetch_row': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/result.c:61: undefined reference to `mysql_fetch_row@4' result.o: In function `rb_mysql_result_free_result': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/result.c:40: undefined reference to `mysql_free_result@4' result.o: In function `nogvl_fetch_row': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/result.c:61: undefined reference to `mysql_fetch_row@4' result.o: In function `rb_mysql_result_fetch_row': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/result.c:133: undefined reference to `mysql_fetch_fields@4' C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/result.c:134: undefined reference to `mysql_fetch_lengths@4' C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/result.c:136: undefined reference to `mysql_num_fields@4' result.o: In function `rb_mysql_result_each': C:\RailsInstaller\Ruby1.8.7\lib\ruby\gems\1.8\gems\mysql2-0.2.7\ext\mysql2/result.c:381: undefined reference to `mysql_num_rows@4' collect2: ld returned 1 exit status make: *** [mysql2.so] Error 1
|
windows 7/64 В чем проблема не подскажите Это сообщение отредактировал(а) evgeniy123 - 3.7.2011, 16:56
|