First try:
sudo gem install mysql
problems?
ok,
2nd try:
sudo gem install mysql -- --with-mysql-config
Maybe you'll get the following output:
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb install mysql -- --with-mysql-config
extconf.rb:1: command not found: mysql_config --cflags
*** 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.
Don't panic that means you don't have the libmysqlclient-dev package that contains the mysql_config file, ok let's install it!
apt-get install libmysqlclient15-dev
We're almost done, the final step is to install the gem telling the compiler where to find the mysql_config file, it should be under the /usr/bin/ directory (check it!)
ok, finally let's install the gem!
gem install gem mysql -- --with-mysql-config=/usr/bin/mysql_config
You can check if the gem is propertly installed using irb:
irb
require 'rubygems'
=>true
require 'mysql'
=>true
exit
5 comments:
thanks. this helped :)
yes. thanks alot!
Np, I'm glad that helped you guys.
Pc games free
gta 4 free download
Post a Comment