Gemfile json installation error when installing treePL - json

I was trying to install treePL
https://github.com/blackrim/*treePL*/wiki/Installation
on my MacBook(Mac OS 12.6) through the Mac terminal, following the official installation guide above.
When it comes to testing if treePL is properly installed with the following line of code:
brew test -v treepl
I recieved the following error:
An error occurred while installing json (2.6.2), and Bundler cannot
continue.
In Gemfile:
rubocop-performance was resolved to 1.15.0, which depends on
rubocop was resolved to 1.35.1, which depends on
json
Error: failed to run `/usr/local/Homebrew/Library/Homebrew/shims/ruby/bundle install`!
Hongs-MacBook-Pro-309:~ hc$
How do I fix this and install treePL properly?
Many thanks.
Full script:
Last login: Wed Oct 19 16:05:54 on ttys000
The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
Hongs-MacBook-Pro-309:~ hc$ brew test -v treepl
/usr/local/Homebrew/Library/Homebrew/shims/ruby/bundle install
Fetching gem metadata from https://rubygems.org/.......
Using concurrent-ruby 1.1.10
Using minitest 5.16.3
Using ast 2.4.2
Using public_suffix 5.0.0
Using bindata 2.4.12
Using zeitwerk 2.6.1
Using bundler 2.3.23
Using connection_pool 2.3.0
Using diff-lcs 1.5.0
Using did_you_mean 1.6.1
Using docile 1.4.0
Using regexp_parser 2.6.0
Using hana 1.3.7
Installing byebug 11.1.3 with native extensions
Installing msgpack 1.6.0 with native extensions
Installing hpricot 0.8.6 with native extensions
Installing unf_ext 0.0.8.2 with native extensions
Installing json 2.6.2 with native extensions
Using uri_template 0.7.0
Using mime-types-data 3.2022.0105
Using net-http-digest_auth 1.4.1
Installing racc 1.6.0 with native extensions
Using rubyntlm 0.6.3
Using webrick 1.7.0
Using webrobots 0.1.2
Using mustache 1.1.1
Using parallel 1.22.1
Using plist 3.6.0
Using rack 3.0.0
Using rainbow 3.1.1
Installing rdiscount 2.2.0.2 with native extensions
Using rexml 3.2.5
Using rspec-support 3.11.1
Using sorbet-runtime 0.5.10461
Using ruby-progressbar 1.11.0
Using unicode-display_width 2.3.0
Using ruby-macho 3.0.0
Using simplecov-html 0.12.3
Using simplecov_json_formatter 0.1.4
Using warning 1.3.0
Using i18n 1.12.0
Using tzinfo 2.0.5
Using addressable 2.8.1
Using elftools 1.2.0
Using parser 3.1.2.1
Using net-http-persistent 4.0.1
Using ecma-re-validator 0.4.0
Using mime-types 3.4.1
Using parallel_tests 3.13.0
Using rspec-core 3.11.0
Using rspec-expectations 3.11.1
Using rspec-mocks 3.11.1
Using rspec-sorbet 1.9.0
Using simplecov 0.21.2
Using activesupport 6.1.7
Using patchelf 1.3.0
Using rubocop-ast 1.21.0
Using json_schemer 0.2.21
Using rspec-github 2.3.1
Using rspec-retry 0.6.2
Using rspec_junit_formatter 0.6.0
Using rspec-its 1.3.0
Using rspec 3.11.0
Using simplecov-cobertura 2.1.0
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/msgpack-1.6.0/ext/msgpack
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20221019-5692-1bhvgyu.rb extconf.rb
checking for ruby/st.h... *** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in
`try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in
`block in try_compile'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in
`with_werror'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in
`try_compile'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1109:in
`block in have_header'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in
`block in checking_for'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block (2 levels) in postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block in postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in
`postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in
`checking_for'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1108:in
`have_header'
from extconf.rb:3:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/msgpack-1.6.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/msgpack-1.6.0
for inspection.
Results logged to
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/msgpack-1.6.0/gem_make.out
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:99:in
`run'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:47:in
`block in build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tempfile.rb:295:in
`open'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:29:in
`build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:185:in
`block in build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/monitor.rb:235:in
`mon_synchronize'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:181:in
`build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:229:in
`block in build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/installer.rb:830:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/source/rubygems.rb:207:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:54:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:62:in
`apply_func'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:57:in
`block in process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`loop'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:91:in
`block (2 levels) in create_threads'
An error occurred while installing msgpack (1.6.0), and Bundler cannot
continue.
In Gemfile:
bootsnap was resolved to 1.13.0, which depends on
msgpack
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.8.2/ext/unf_ext
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20221019-5692-vl5rza.rb extconf.rb
checking for -lstdc++... *** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
--with-static-libstdc++
--without-static-libstdc++
--with-stdc++lib
--without-stdc++lib
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in
`try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:546:in
`block in try_link0'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in
`mktmpdir'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:543:in
`try_link0'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:570:in
`try_link'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:789:in
`try_func'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1016:in
`block in have_library'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in
`block in checking_for'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block (2 levels) in postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block in postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in
`postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in
`checking_for'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1011:in
`have_library'
from extconf.rb:6:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/unf_ext-0.0.8.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.8.2
for inspection.
Results logged to
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/unf_ext-0.0.8.2/gem_make.out
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:99:in
`run'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:47:in
`block in build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tempfile.rb:295:in
`open'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:29:in
`build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:185:in
`block in build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/monitor.rb:235:in
`mon_synchronize'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:181:in
`build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:229:in
`block in build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/installer.rb:830:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/source/rubygems.rb:207:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:54:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:62:in
`apply_func'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:57:in
`block in process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`loop'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:91:in
`block (2 levels) in create_threads'
An error occurred while installing unf_ext (0.0.8.2), and Bundler
cannot continue.
In Gemfile:
mechanize was resolved to 2.8.5, which depends on
http-cookie was resolved to 1.0.5, which depends on
domain_name was resolved to 0.5.20190701, which depends on
unf was resolved to 0.1.4, which depends on
unf_ext
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/hpricot-0.8.6/ext/fast_xs
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20221019-5692-wqeeu4.rb extconf.rb
checking for stdio.h... *** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in
`try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in
`block in try_compile'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in
`with_werror'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in
`try_compile'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1109:in
`block in have_header'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in
`block in checking_for'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block (2 levels) in postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block in postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in
`postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in
`checking_for'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1108:in
`have_header'
from extconf.rb:2:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/hpricot-0.8.6/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/hpricot-0.8.6
for inspection.
Results logged to
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/hpricot-0.8.6/gem_make.out
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:99:in
`run'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:47:in
`block in build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tempfile.rb:295:in
`open'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:29:in
`build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:185:in
`block in build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/monitor.rb:235:in
`mon_synchronize'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:181:in
`build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:229:in
`block in build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/installer.rb:830:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/source/rubygems.rb:207:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:54:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:62:in
`apply_func'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:57:in
`block in process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`loop'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:91:in
`block (2 levels) in create_threads'
An error occurred while installing hpricot (0.8.6), and Bundler cannot
continue.
In Gemfile:
ronn was resolved to 0.7.3, which depends on
hpricot
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/ext/generator
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20221019-5692-j1yh1f.rb extconf.rb
creating Makefile
current directory:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/ext/generator
make "DESTDIR=" clean
current directory:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
In file included from generator.c:1:
In file included from ./../fbuffer/fbuffer.h:5:
In file included from
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10:
fatal error: 'ruby/config.h' file not found
#include "ruby/config.h"
^~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10:
note: did not find header 'config.h' in framework 'ruby' (loaded from
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks')
1 error generated.
make: *** [generator.o] Error 1
make failed, exit code 2
Gem files will remain installed in
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/json-2.6.2
for inspection.
Results logged to
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/json-2.6.2/gem_make.out
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:99:in
`run'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:51:in
`block in make'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:43:in
`each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:43:in
`make'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:62:in
`block in build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tempfile.rb:295:in
`open'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:29:in
`build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:185:in
`block in build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/monitor.rb:235:in
`mon_synchronize'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:181:in
`build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:229:in
`block in build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/installer.rb:830:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/source/rubygems.rb:207:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:54:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:62:in
`apply_func'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:57:in
`block in process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`loop'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:91:in
`block (2 levels) in create_threads'
An error occurred while installing json (2.6.2), and Bundler cannot
continue.
In Gemfile:
rubocop-performance was resolved to 1.15.0, which depends on
rubocop was resolved to 1.35.1, which depends on
json
Error: failed to run `/usr/local/Homebrew/Library/Homebrew/shims/ruby/bundle install`!
Hongs-MacBook-Pro-309:~ hc$

Have followed the official guide to do a few things, not sure which action led to the successful installation.
https://github.com/blackrim/treePL/wiki/Installation
I find that most problems are caused by library dependency issues, i.e. just try to install whatever library was mentioned in the error
For mac it is very important to have homebrew and MacPorts for installing other libraries. I installed homebrew very easily using the line of code on their website in the mac terminal. MacPorts on the other hand can be installed using an installer available on their website https://www.macports.org/install.php
It is also very important to install Xcode(because it contains git) and the Command Line tools on mac using AppStore/official installers
the treePL github site also stated that NLopt is library prerequisite, which I successfully installed using homebrew. adolc is an optional prerequisite for the cross-verification function but I am still struggling to install it.
when installing a certain package through git, I bumped into an error regarding the failure to connect to git, it can be fixed by replacing git to https to overcome the firewall, see this post for more info
Unable to Connect to GitHub.com For Cloning
Either way after completing all of the above I can finally pass the test
brew test -v treepl

Related

OpenShift rhc app create (Errno::EMSGSIZE)

I want to create WebSocket java application using this tutorial: https://blog.openshift.com/deploy-websocket-web-applications-with-jboss-wildfly/ . I created account, installed ruby, git, rhc, logged in successfully, created key, domain. I should create app then. rhc app create wildfly diy command causes error and this console output:
Using diy-0.1 (Do-It-Yourself 0.1) for 'diy'
Application Options
-------------------
Domain: weedteam
Cartridges: diy-0.1
Gear Size: default
Scaling: no
Creating application 'wildfly' ... done
Disclaimer: This is an experimental cartridge that provides a way to try unsupported languages, frameworks, and middleware on OpenShift.
Waiting for your DNS name to be available ... D:/Ruby22/lib/ruby/2.2.0/resolv.rb
:759:in `recvfrom': Komunikat wys│any na gniazdo datagramu by│ wiŕkszy ni┐ wewnŕ
trzny bufor lub przekracza│ inny sieciowy limit albo bufor u┐ywany do odbierania
datagramˇw by│ mniejszy ni┐ sam datagram. - recvfrom(2) (Errno::EMSGSIZE)
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:759:in `recv_reply'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:690:in `request'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:528:in `block in fetch_resource'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:1096:in `block (3 levels) in res
olv'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:1094:in `each'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:1094:in `block (2 levels) in res
olv'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:1093:in `each'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:1093:in `block in resolv'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:1091:in `each'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:1091:in `resolv'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:519:in `fetch_resource'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:509:in `each_resource'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:500:in `getresources'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/helpers.rb:43
4:in `host_exists?'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/commands/app.
rb:675:in `block in dns_propagated?'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/commands/app.
rb:674:in `upto'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/commands/app.
rb:674:in `dns_propagated?'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/commands/app.
rb:201:in `block in create'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/highline_exte
nsions.rb:190:in `call'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/highline_exte
nsions.rb:190:in `section'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/highline_exte
nsions.rb:204:in `paragraph'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/helpers.rb:33
7:in `block (2 levels) in <module:Helpers>'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/commands/app.
rb:199:in `create'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/commands.rb:2
94:in `execute'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/commands.rb:2
85:in `block (3 levels) in to_commander'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/commander-4.2.1/lib/commander/co
mmand.rb:180:in `call'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/commander-4.2.1/lib/commander/co
mmand.rb:180:in `call'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/commander-4.2.1/lib/commander/co
mmand.rb:155:in `run'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/commander-4.2.1/lib/commander/ru
nner.rb:419:in `run_active_command'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/command_runne
r.rb:72:in `run!'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/commander-4.2.1/lib/commander/de
legates.rb:8:in `run!'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/cli.rb:37:in
`start'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/bin/rhc:20:in `<top (
required)>'
from D:/Ruby22/bin/rhc:23:in `load'
from D:/Ruby22/bin/rhc:23:in `<main>'
When I check on the website, the app is created and running, but I can't proceed to the next step of this tutorial
$ cd wildfly
$ rhc app stop --app wildfly
$ git rm diy/index.html
$ git rm diy/testrubyserver.rb
cd wildfly is not working, rhc app stop --app wildfly stops app (as it should), and another 2 commands can't find repo. I think it's because create app command should do something more, but it was interrupted by this error. Am I wrong? What can I do to stop this error from happening?

Can't get buildr to run checkstyle

I've been trying to get buildr to run checkstyle.
I've added the requirement as
require 'buildr/checkstyle'
But when I run
buildr checkstyle:html
I get this (with trace)
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task_manager.rb:49:in `[]'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:115:in `invoke_task'
/var/lib/gems/1.9.1/gems/buildr-1.4.16/lib/buildr/core/application.rb:238:in `block (2 levels) in top_level'
/var/lib/gems/1.9.1/gems/buildr-1.4.16/lib/buildr/core/application.rb:238:in `each'
/var/lib/gems/1.9.1/gems/buildr-1.4.16/lib/buildr/core/application.rb:238:in `block in top_level'
/var/lib/gems/1.9.1/gems/buildr-1.4.16/lib/buildr/core/application.rb:535:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/buildr-1.4.16/lib/buildr/core/application.rb:230:in `top_level'
/var/lib/gems/1.9.1/gems/buildr-1.4.16/lib/buildr/core/application.rb:131:in `block in run'
/var/lib/gems/1.9.1/gems/buildr-1.4.16/lib/buildr/core/application.rb:535:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/buildr-1.4.16/lib/buildr/core/application.rb:128:in `run'
/var/lib/gems/1.9.1/gems/buildr-1.4.16/bin/buildr:20:in `<top (required)>'
/usr/local/bin/buildr:23:in `load'
/usr/local/bin/buildr:23:in `<main>'
Any idea what I have missed?
A few things to note. The checkstyle targets are added to the project in which they are defined. So if you create a project like
require 'buildr/checkstyle'
define "foo" do
project.version = "1.0.0"
checkstyle.config_directory = _('etc/checkstyle')
end
Then you will need to invoke the buildr task "buildr foo:checkstyle:html". It should be noted that it is not enough to simply add the require to the buildfile, you also need to supply a configuration file listing the checks. By default this located in the configuration directory with a name of "checks.xml" so for the above example you would need to place the checkstyle configuration file at "etc/checkstyle/checks.xml".
Versions of buildr prior to 1.4.17 also require that you specify an xsl stylesheet if you want to generate a html report. This defaults to the name "checkstyle-report.xsl" in the configuration directory but from buildr versions 1.4.17 onwards, buildr supplies it's own version of the xsl.

What does this error mean as an output from the rails command?

from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:68:in `block (2 levels) in
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:66:in `each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:66:in `block in require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:55:in `each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:55:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler.rb:122:in `require'
from C:/RAILSI~1/INTERE~1/config/application.rb:7:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.9/lib/rails/commands.rb:53:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.9/lib/rails/commands.rb:53:in `block in <top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.9/lib/rails/commands.rb:50:in `tap'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.9/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
C:\RAILSI~1\INTERE~1\config>
This is all the output I could grab because DOS doesn't scroll up.
I am trying to port a rails app from Linux to windows. The only thing different is this app uses mysql. So In installed the MYSQL gem. Both using ruby 191, both using rails 329.
I have done some digging and it seams its because the mysql.dll I put in there is version 5.0 when the mysql gem was compiled for 6.0. Client 6.0 doesn't seem to exist.
I wouldn't normally ask but I am at my wit's end with this.
If you're using version 2.9.x of the MySQL gem, it was built against MySQL 6.0 and you can download the correct version of the C Connector from the MySQL web site. After installing the mysql gem, it should have given you a URL to go to to download the correct version. However, if you installed mysql using bundle install then the post-install message may not have been displayed.
http://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-noinstall-6.0.2-win32.zip/from/http://cdn.mysql.com/
There's the URL to grab the binary library as a ZIP file.
http://dev.mysql.com/downloads/connector/c/
In case the first link doesn't work, there's the URL with all of the available C Connector downloads. You want Windows (x86, 32-bit), ZIP Archive (the second one; the one where the filename does not end in vs2005).
If the MySQL library still comes up as a mismatch, do a gem list mysql to get the version that is installed, then uninstall and reinstall the gem manually:
gem uninstall mysql
gem install -v=x.x.x mysql
Replace x.x.x with the version number that was reported previously. After the gem is installed, it should give you the URL of the C Connector you need to install.

Rails cannot generate model using mysql

Windows XP with installed MYSQL as a development machine, ruby 1.9.2p290 (2011-07-09) [i386-mingw32], Rails 3.1.0
gem install mysql2 -- '--with-mysql-lib="c:\Program Files\MySQL\MySQL S
erver 5.5\lib" --with-mysql-include="c:\Program Files\MySQL\MySQL Server 5.5\inc
lude"' (successfully installed gem mysql2)
rails new talk -d mysql (successfully created a new rails app called talk)
PROBLEM NOW STARTS:
C:\Sites\RP\talk>rails generate User
ERROR MESSAGE:
ruby.exe-Unable to Locate Component
This application has failed to start because libmysql.dll was not found. Re-installing the application may fix this problem.
COMMAND LINE ERROR MESSAGE:
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/mysql2-0.3.10/lib/mysql2.rb
:9:in require': 126: The specified module could not be found. - C:/RailsInsta
ller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/mysql2-0.3.10/lib/mysql2/mysql2.so (Load
Error)
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/mysql2-0.3.10/
lib/mysql2.rb:9:in'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/runtime.rb:68:in require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/runtime.rb:68:inblock (2 levels) in require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/runtime.rb:66:in each'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/runtime.rb:66:inblock in require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/runtime.rb:55:in each'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/runtime.rb:55:inrequire'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler.rb:120:in require'
from C:/Sites/RP/talk/config/application.rb:9:in'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.0
/lib/rails/commands.rb:21:in require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.0
/lib/rails/commands.rb:21:in'
from script/rails:6:in require'
from script/rails:6:in'
http://www.ruby-forum.com/topic/150580 has the answer. for some reason I need to:
1/ gem install mysql
2/ copy the libmysql.dll file from /MYSQL/MySQL Server 5.5/lib and paste it to Ruby1.9.2/bin
after that, it is smooth sailing...
Even though I did it, I would appreciate if anyone has an insight into the reason behind this:
On windows there should be a LIB environment variable. Have you checked to make sure that the path to libmysql has been added to this? I suspect it hasn't.

Error installing mysql2 gem: Failed to build gem native extension

Windows XP. Ruby 1.9.2. Rails installed. MySQL installed. When I try to run gem install mysql2 (or bundle install) I get errors:
C:\ruby\cred2>gem install mysql2
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
C:/Ruby192/bin/ruby.exe extconf.rb
checking for rb_thread_blocking_region()... *** 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=C:/Ruby192/bin/ruby
C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to genera
te an executable file. (RuntimeError)
You have to install development tools first.
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:435:in `try_link0'
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:440:in `try_link'
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:552:in `try_func'
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:797:in `block in have_func'
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for'
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postp
one'
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone'
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:796:in `have_func'
from extconf.rb:9:in `<main>'
Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.
2.4 for inspection.
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.4/ext/mysql2/ge
m_make.out
C:\ruby\cred2>
Just for the record: The problem should be solved!
The mysql2 gem v.0.2.6 is out, having win32 support.
gem install mysql2 worked without problems now (DevKit installed).
See: http://github.com/brianmario/mysql2/issues/issue/8#issue/8/comment/479748
I guess that this gem uses C bindings and so has to be compiled. To do that in Windows you'd probably need to have the whole mingw (or possibly cygwin) environment set up. And still, I'm not sure this will help.
You can try to use mysql or ruby-mysql on your Windows machine.
if you haven't installed DevKit yet, this is the way to go.
I did it yesterday it worked perfectly (i have a Win XP box too).
the installation process is relatively straightforward (but well documented)
http://www.rubyinstaller.org/add-ons/devkit/