Symptoms (may be little different):
gem install mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb install mysql
checking for mysql_ssl_set()... yes
checking for mysql.h... yes
creating Makefile
make
gcc -I. -I/usr/include/ruby-1.9.1/i686-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -DHAVE_MYSQL_SSL_SET -DHAVE_MYSQL_H -D_FILE_OFFSET_BITS=64 -I/usr/include/mysql -fPIC -pipe -DUNIV_LINUX -fPIC -march=i686 -mtune=generic -O2 -pipe -O2 -g -Wall -Wno-parentheses -fPIC -o mysql.o -c mysql.c
mysql.c:6:21: error: version.h: Nie ma takiego pliku ani kataloguv mysql.c: In function ‘make_field_obj’:
mysql.c:185: warning: unused variable ‘hash’
mysql.c: In function ‘escape_string’:
mysql.c:267: error: ‘struct RString’ has no member named ‘len’
mysql.c:268: error: ‘struct RString’ has no member named ‘len’
mysql.c:268: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:268: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:268: error: ‘struct RString’ has no member named ‘len’
mysql.c: In function ‘real_escape_string’:
mysql.c:401: error: ‘struct RString’ has no member named ‘len’
mysql.c:402: error: ‘struct RString’ has no member named ‘len’
mysql.c:402: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:402: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:402: error: ‘struct RString’ has no member named ‘len’
mysql.c: In function ‘query’:
mysql.c:710: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:710: error: ‘struct RString’ has no member named ‘len’
mysql.c:729: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:729: error: ‘struct RString’ has no member named ‘len’
mysql.c: In function ‘query_with_result_set’:
mysql.c:882: warning: implicit declaration of function ‘TypeError’
mysql.c: In function ‘fetch_field_direct’:
mysql.c:960: warning: implicit declaration of function ‘Raise’
mysql.c: In function ‘fetch_hash2’:
mysql.c:1032: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:1033: error: ‘struct RString’ has no member named ‘ptr’
mysql.c: In function ‘field_inspect’:
mysql.c:1157: error: ‘struct RString’ has no member named ‘len’
mysql.c:1158: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:1158: error: ‘struct RString’ has no member named ‘ptr’
mysql.c: In function ‘stmt_bind_result’:
mysql.c:1284: error: ‘struct RString’ has no member named ‘ptr’
mysql.c: In function ‘stmt_execute’:
mysql.c:1346: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:1347: error: ‘struct RString’ has no member named ‘len’
mysql.c:1348: error: ‘struct RString’ has no member named ‘len’
mysql.c:1359: error: ‘struct RArray’ has no member named ‘ptr’
mysql.c:1360: error: ‘struct RArray’ has no member named ‘ptr’
mysql.c:1361: error: ‘struct RArray’ has no member named ‘ptr’
mysql.c:1362: error: ‘struct RArray’ has no member named ‘ptr’
mysql.c:1363: error: ‘struct RArray’ has no member named ‘ptr’
mysql.c:1364: error: ‘struct RArray’ has no member named ‘ptr’
mysql.c:1316: warning: unused variable ‘false’
mysql.c: In function ‘stmt_prepare’:
mysql.c:1584: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:1584: error: ‘struct RString’ has no member named ‘len’
mysql.c: In function ‘time_initialize’:
mysql.c:1703: warning: no return statement in function returning non-void
make: *** [mysql.o] Błąd 1
Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/mysql-2.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.9.1/gems/mysql-2.7/gem_make.out
Cause: outdated gem (there's no version.h in ruby 1.9.1)
Fix:
wget http://rubyforge.org/frs/download.php/51087/mysql-ruby-2.8.1.tar.gz tar -xvzf mysql-ruby-2.8.1.tar.gz cd mysql-ruby.2.8.1 ruby extconf.rb --with-mysql-config=/usr/bin/mysql_config # may be different in your distribution make make install make clean
Checking:
bash-3.2# irb -r mysql irb(main):001:0>
nieee, to zauważyłem dopiero po napisaniu komcia. ^^ chodziło mi o kilka ostatnich wpisów, w których opisujesz niedziałające rzeczy.
marines - well, I guess I'm not a lucky man lately ;) At least this one I could fix by my own, not using voodoo programming and waving a dead chicken
marines
jak pech to pech ;]