Hey
I’m trying to Migrate a WordPress to Discourse.
Development environment: macOS.
Discourse works fine, but when I try to Migrate a WordPress to Discourse by run
IMPORT=1 bundle && IMPORT=1 bundle exec ruby script/import_scripts/bbpress.rb
I get this error
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/devuser/.rvm/gems/ruby-3.2.2/gems/mysql2-0.5.5/ext/mysql2
/Users/devuser/.rvm/rubies/ruby-3.2.2/bin/ruby extconf.rb
checking for rb_absint_size()... yes
checking for rb_absint_singlebit_p()... yes
checking for rb_gc_mark_movable()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enc_interned_str() in ruby.h... yes
-----
Cannot find library dir(s) /home/devuser/.rvm/usr/lib
-----
*** 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=/Users/devuser/.rvm/rubies/ruby-3.2.2/bin/$(RUBY_BASE_NAME)
--with-openssl-dir
--with-openssl-dir
--with-openssl-include
--without-openssl-include=${openssl-dir}/include
--with-openssl-lib
--without-openssl-lib=${openssl-dir}/lib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/devuser/.rvm/gems/ruby-3.2.2/extensions/arm64-darwin-22/3.2.0/mysql2-0.5.5/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/devuser/.rvm/gems/ruby-3.2.2/gems/mysql2-0.5.5 for inspection.
Results logged to /Users/devuser/.rvm/gems/ruby-3.2.2/extensions/arm64-darwin-22/3.2.0/mysql2-0.5.5/gem_make.out
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:119:in `run'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/ext/ext_conf_builder.rb:27:in `build'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:187:in `build_extension'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:221:in `block in build_extensions'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:218:in `each'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:218:in `build_extensions'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/installer.rb:843:in `build_extensions'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/rubygems_gem_installer.rb:72:in `build_extensions'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/rubygems_gem_installer.rb:28:in `install'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/source/rubygems.rb:200:in `install'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/installer/gem_installer.rb:54:in `install'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/installer/parallel_installer.rb:155:in `do_install'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/installer/parallel_installer.rb:146:in `block in worker_pool'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/worker.rb:62:in `apply_func'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/worker.rb:57:in `block in process_queue'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/worker.rb:54:in `loop'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/worker.rb:54:in `process_queue'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/worker.rb:90:in `block (2 levels) in create_threads'
An error occurred while installing mysql2 (0.5.5), and Bundler cannot continue.
In Gemfile:
mysql2
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/devuser/.rvm/gems/ruby-3.2.2/gems/tiny_tds-2.1.5/ext/tiny_tds
/Users/devuser/.rvm/rubies/ruby-3.2.2/bin/ruby extconf.rb
looking for freetds headers in the following directories:
- /opt/local/include
- /opt/local/include/freetds
- /usr/local/include
- /usr/local/include/freetds
looking for freetds library in the following directories:
- /opt/local/lib
- /opt/local/lib/freetds
- /usr/local/lib
- /usr/local/lib/freetds
checking for sybfront.h... no
checking for sybdb.h... no
checking for tdsdbopen() in -lsybdb... no
checking for dbanydatecrack() in -lsybdb... no
Failed! Do you have FreeTDS 0.95.80 or higher installed?
*** 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=/Users/devuser/.rvm/rubies/ruby-3.2.2/bin/$(RUBY_BASE_NAME)
--help
--with-freetds-dir
--without-freetds-dir
--with-freetds-include
--without-freetds-include=${freetds-dir}/include
--with-freetds-lib
--without-freetds-lib=${freetds-dir}/lib
--with-sybdb-dir
--without-sybdb-dir
--with-sybdb-include
--without-sybdb-include=${sybdb-dir}/include
--with-sybdb-lib
--without-sybdb-lib=${sybdb-dir}/lib
--with-sybdblib
--without-sybdblib
--with-sybdblib
--without-sybdblib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/devuser/.rvm/gems/ruby-3.2.2/extensions/arm64-darwin-22/3.2.0/tiny_tds-2.1.5/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/devuser/.rvm/gems/ruby-3.2.2/gems/tiny_tds-2.1.5 for inspection.
Results logged to /Users/devuser/.rvm/gems/ruby-3.2.2/extensions/arm64-darwin-22/3.2.0/tiny_tds-2.1.5/gem_make.out
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:119:in `run'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/ext/ext_conf_builder.rb:27:in `build'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:187:in `build_extension'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:221:in `block in build_extensions'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:218:in `each'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:218:in `build_extensions'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/installer.rb:843:in `build_extensions'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/rubygems_gem_installer.rb:72:in `build_extensions'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/rubygems_gem_installer.rb:28:in `install'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/source/rubygems.rb:200:in `install'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/installer/gem_installer.rb:54:in `install'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/installer/parallel_installer.rb:155:in `do_install'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/installer/parallel_installer.rb:146:in `block in worker_pool'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/worker.rb:62:in `apply_func'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/worker.rb:57:in `block in process_queue'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/worker.rb:54:in `loop'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/worker.rb:54:in `process_queue'
/Users/devuser/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/worker.rb:90:in `block (2 levels) in create_threads'
An error occurred while installing tiny_tds (2.1.5), and Bundler cannot continue.
In Gemfile:
tiny_tds
I need some assistance
Thanks