Continue to set the gem that is breaking at a certain point

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 # change -lmysqlclient_r to -lmysqlclient
$ 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)
...
+3
source share
2 answers

After a makeyou have to do make install.

+4
source

All Articles