1
It’s been a while since I started playing with Ruby on Rails on Ubuntu and created some little projects.
I currently installed the distro Manjaro and installed ruby and Rails and I want to run my project created on Ubuntu, but I am facing a problem with Gem mysql2.
When trying to startar the application "Rails" the following error is shown:
Could not find Proper version of railties (4.2.1) in any of the sources Run
bundle install
to install Missing Gems.
When executing the Bundle install command the following error occurs:
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
current directory: /home/wagner/.rvm/gems/ruby-2.3.1/gems/mysql2-0.3.18>>/ext/mysql2
/home/wagner/.rvm/rubies/ruby-2.3.1/bin/ruby -r >./siteconf20160831-4570-57p5rs.rb extconf.rb
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lmygcc... no
checking for mysql_query() in -lmysqlclient... 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=/home/wagner/.rvm/rubies/ruby-2.3.1/bin/$(RUBY_BASE_NAME)
--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-mysql-config
--without-mysql-config
--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-mysqlclientlib
--without-mysqlclientlib
--with-mlib
--without-mlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-zlib
--without-zlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-socketlib
--without-socketlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-nsllib
--without-nsllib
--with-mysqlclientlib
--without-mysqlclientlib
--with-mygcclib
--without-mygcclib
--with-mysqlclientlib
--without-mysqlclientlib
To see why this extension failed to compile, please check the mkmf.log >which can be found here:
/home/wagner/.rvm/gems/ruby-2.3.1/extensions/x86_64-linux/2.3.0>/mysql2-0.3.18/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/wagner/.rvm/gems/ruby-2.3.1/gems/mysql2-0.3.18 for inspection.
Results logged to /home/wagner/.rvm/gems/ruby-2.3.1/extensions/x86_64->linux/2.3.0/mysql2-0.3.18/gem_make.out
In my gemfile Gem is configured as follows: 'mysql2', '~> 0.3.18'
Does anyone have any idea what could be wrong? Thank you very much for your attention.
Hello, Manjaro does not have the apt-get command. On the weekend when I am at home I will look for the equivalent command for Manjaro . Thanks for the tip.
– Wagner Rodrigues
@Wagnerrodrigues worked out well?
– Luiz Carvalho
I didn’t even have time to look over the weekend. Today I searched and did not find the equivalent commands for Manjaro, but when searching for mysql in Pacman package manager I found the libmariadbclient package and installed it. After that I ran Bundle install and it worked. Thanks for the help.
– Wagner Rodrigues
The answer does not answer the question.
– Fernando Kosh