rvm / ubuntu_rvm

Ubuntu package for RVM
https://launchpad.net/~rael-gc/+archive/ubuntu/rvm
Apache License 2.0
694 stars 84 forks source link

I created a new mysql user and for rails when i'am running bundle install it gives me this error. How can i fix this, any suggestion or experience with this? #60

Closed prem-online closed 2 years ago

prem-online commented 2 years ago

Using rails 6.1.4.1 Installing mysql2 0.5.3 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /home/palak/.rvm/gems/ruby-3.0.1/gems/mysql2-0.5.3/ext/mysql2

/usr/share/rvm/rubies/ruby-3.0.1/bin/ruby -I /usr/share/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0 -r ./siteconf20210908-15186-9hidkz.rb extconf.rb checking for rb_absint_size()... yes checking for rb_absint_singlebit_p()... yes checking for rb_wait_for_single_fd()... yes 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=/usr/share/rvm/rubies/ruby-3.0.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-mysqlclient-dir --without-mysqlclient-dir --with-mysqlclient-include --without-mysqlclient-include=${mysqlclient-dir}/include --with-mysqlclient-lib --without-mysqlclient-lib=${mysqlclient-dir}/lib --with-mysqlclientlib --without-mysqlclientlib /usr/share/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/mkmf.rb:1050:in block in find_library': undefined methodsplit' for nil:NilClass (NoMethodError) from /usr/share/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/mkmf.rb:1050:in collect' from /usr/share/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/mkmf.rb:1050:infind_library' from extconf.rb:87:in `

'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/home/palak/.rvm/gems/ruby-3.0.1/extensions/x86_64-linux/3.0.0/mysql2-0.5.3/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/palak/.rvm/gems/ruby-3.0.1/gems/mysql2-0.5.3 for inspection. Results logged to /home/palak/.rvm/gems/ruby-3.0.1/extensions/x86_64-linux/3.0.0/mysql2-0.5.3/gem_make.out

/usr/share/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/rubygems/ext/builder.rb:91:in run' /usr/share/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:48:inblock in build' /usr/share/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tempfile.rb:317:in open' /usr/share/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:28:inbuild' /usr/share/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/rubygems/ext/builder.rb:157:in build_extension' /usr/share/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/rubygems/ext/builder.rb:191:inblock in build_extensions' /usr/share/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/rubygems/ext/builder.rb:188:in each' /usr/share/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/rubygems/ext/builder.rb:188:inbuild_extensions' /usr/share/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/rubygems/installer.rb:821:in build_extensions' /home/palak/.rvm/gems/ruby-3.0.1/gems/bundler-2.2.26/lib/bundler/rubygems_gem_installer.rb:66:inbuild_extensions' /home/palak/.rvm/gems/ruby-3.0.1/gems/bundler-2.2.26/lib/bundler/rubygems_gem_installer.rb:26:in install' /home/palak/.rvm/gems/ruby-3.0.1/gems/bundler-2.2.26/lib/bundler/source/rubygems.rb:192:ininstall' /home/palak/.rvm/gems/ruby-3.0.1/gems/bundler-2.2.26/lib/bundler/installer/gem_installer.rb:54:in install' /home/palak/.rvm/gems/ruby-3.0.1/gems/bundler-2.2.26/lib/bundler/installer/gem_installer.rb:16:ininstall_from_spec' /home/palak/.rvm/gems/ruby-3.0.1/gems/bundler-2.2.26/lib/bundler/installer/parallel_installer.rb:186:in do_install' /home/palak/.rvm/gems/ruby-3.0.1/gems/bundler-2.2.26/lib/bundler/installer/parallel_installer.rb:177:inblock in worker_pool' /home/palak/.rvm/gems/ruby-3.0.1/gems/bundler-2.2.26/lib/bundler/worker.rb:62:in apply_func' /home/palak/.rvm/gems/ruby-3.0.1/gems/bundler-2.2.26/lib/bundler/worker.rb:57:inblock in process_queue' /home/palak/.rvm/gems/ruby-3.0.1/gems/bundler-2.2.26/lib/bundler/worker.rb:54:in loop' /home/palak/.rvm/gems/ruby-3.0.1/gems/bundler-2.2.26/lib/bundler/worker.rb:54:inprocess_queue' /home/palak/.rvm/gems/ruby-3.0.1/gems/bundler-2.2.26/lib/bundler/worker.rb:91:in `block (2 levels) in create_threads'

An error occurred while installing mysql2 (0.5.3), and Bundler cannot continue.

In Gemfile: mysql2

raelgc commented 2 years ago

Hi @ror-prem and thanks for reporting this issue. But this project is focused only in the Ubuntu installer. Once rvm is installed, it'll operate the same way as manually installed. Do you mind to open this issue on https://github.com/rvm/rvm?

prem-online commented 2 years ago

@raelgc thanks for replaying, it got solved.