I need to install mysql2 gem, but it breaks when connected to "ERROR: Failed to build gem native extension". It really uses the wrong -lmysqlclient_r, while it should use -lmysqlclient.
So what I do:
$ cd /usr/local/rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/ext/mysql2
$ vi Makefile
$ make
linking shared-object mysql2/mysql2.so
$ cd ../../
What should I do now to continue the installation from this point?
Update: Running make install "worked", I think. however, my ruby installation was so broken that I decided to start from scratch, this time with a userpace installation. After proceeding to install mysql2:
$ make install
/usr/bin/install -c -m 0755 mysql2.so /data/web/rails/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/lib/mysql2
$ rails server -d
/data/web/rails/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/resolver.rb:287:in `resolve': Could not find gem 'mysql2 (>= 0) ruby' in the gems available on this machine. (Bundler::GemNotFound)
...
source
share