Iconv gem refuses to install on ruby 2.2 (windows) - ruby

While installing iconv on windows I get the following errors
following the advice of a users post here I tried the following after installing libconv http://gnuwin32.sourceforge.net/packages/libiconv.htm
gem install iconv -v '1.0.4' -- --with-iconv-dir=C:\Program Files (x86)\GnuWin32
I had no success, below are the output errors.
error in cmd
C:\Users\ALilland\Documents\macros\experiments\core_scripts\app>gem install iconv -v '1.0.4' -- --with-iconv-dir=C:\Program Files (x86)\GnuWin32
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-iconv-dir=C:\Program Files (x86)\GnuWin32'
This could take a while...
ERROR: Error installing iconv:
ERROR: Failed to build gem native extension.
C:/Ruby22/bin/ruby.exe -r ./siteconf20160919-12804-5eyr6.rb extconf.rb --with-iconv-dir=C:\Program Files (x86)\GnuWin32
checking for rb_enc_get() in ruby/encoding.h... yes
checking for rb_sys_fail_str() in ruby.h... yes
checking for iconv() in iconv.h... no
checking for iconv() in -liconv... 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=C:/Ruby22/bin/$(RUBY_BASE_NAME)
--with-iconv-dir
--with-iconv-include
--without-iconv-include=${iconv-dir}/include
--with-iconv-lib
--without-iconv-lib=${iconv-dir}/lib
--enable-config-charset
--disable-config-charset
--with-config-charset
--without-config-charset
--with-iconvlib
--without-iconvlib
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby22/lib/ruby/gems/2.2.0/gems/iconv-1.0.4 for inspection.
Results logged to C:/Ruby22/lib/ruby/gems/2.2.0/extensions/x86-mingw32/2.2.0/iconv-1.0.4/gem_make.out
C:\Users\ALilland\Documents\macros\experiments\core_scripts\app>
gem_make.out
C:/Ruby22/bin/ruby.exe -r ./siteconf20160919-12804-5eyr6.rb extconf.rb --with-iconv-dir=C:\Program Files (x86)\GnuWin32
checking for rb_enc_get() in ruby/encoding.h... yes
checking for rb_sys_fail_str() in ruby.h... yes
checking for iconv() in iconv.h... no
checking for iconv() in -liconv... 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=C:/Ruby22/bin/$(RUBY_BASE_NAME)
--with-iconv-dir
--with-iconv-include
--without-iconv-include=${iconv-dir}/include
--with-iconv-lib
--without-iconv-lib=${iconv-dir}/lib
--enable-config-charset
--disable-config-charset
--with-config-charset
--without-config-charset
--with-iconvlib
--without-iconvlib
extconf failed, exit code 1

I solved this issue by,
Error while installing iconv on windows by ruby2.0.0
Tricky part was copying files from /include, /bin and /lib of /GnuWin32 quickly into /Ruby2.2.0/lib/ruby/gems/2.2.0/gems/iconv-1.0.4/ext/iconv when gem install goes to Building native extensions. This could take a while...
Hope this will help someone.

Related

unable to install capybara-webkit in centos 8

I'm trying to install capybara, on my ruby 2.7.3 system, and it's failing.
I appear to not be able to look at the output and see the magic words Command 'qmake ' not available
my output:
gem install capybara-webkit
Building native extensions. This could take a while...
ERROR: Error installing capybara-webkit:
ERROR: Failed to build gem native extension.
current directory: /var/home/user/.rvm/gems/ruby-2.7.3/gems/capybara-webkit-1.15.1
/var/home/user/.rvm/rubies/ruby-2.7.3/bin/ruby -I /var/home/user/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0 -r ./siteconf20210604-1512733-c8fw23.rb extconf.rb
*** 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=/var/home/user/.rvm/rubies/ruby-2.7.3/bin/$(RUBY_BASE_NAME)
--with-gl-dir
--without-gl-dir
--with-gl-include
--without-gl-include=${gl-dir}/include
--with-gl-lib
--without-gl-lib=${gl-dir}/lib
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
Command 'qmake ' not available
extconf failed, exit code 1
Gem files will remain installed in /var/home/user/.rvm/gems/ruby-2.7.3/gems/capybara-webkit-1.15.1 for inspection.
Results logged to /var/home/user/.rvm/gems/ruby-2.7.3/extensions/x86_64-linux/2.7.0/capybara-webkit-1.15.1/gem_make.out

Unable to install newest libxml-ruby gem

I am having trouble installing the newest libxml-ruby gem for ruby 2.3.3. Here is the error I am getting:
ERROR: Error installing libxml-ruby:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby-2.3.3/lib/ruby/gems/2.3.0/gems/libxml-ruby-2.9.0/ext/libxml
C:/Ruby-2.3.3/bin/ruby.exe -r ./siteconf20170117-6916-4mgpq6.rb extconf.rb
checking for libxml/xmlversion.h in /opt/include/libxml2,/opt/local/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... yes
checking for xmlParseDoc() in -lxml2... 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=C:/Ruby-2.3.3/bin/$(RUBY_BASE_NAME)
--with-xml2-config
--without-xml2-config
--with-xml2-dir
--without-xml2-dir
--with-xml2-include
--without-xml2-include=${xml2-dir}/include
--with-xml2-lib
--without-xml2-lib=${xml2-dir}/lib
--with-xml2lib
--without-xml2lib
extconf failure: need libxml2.
Install the library or try one of the following options to extconf.rb:
--with-xml2-config=/path/to/xml2-config
--with-xml2-dir=/path/to/libxml2
--with-xml2-lib=/path/to/libxml2/lib
--with-xml2-include=/path/to/libxml2/include
To see why this extension failed to compile, please check the mkmf.log which can be found here:
I have found similar issues when looking for a solution, but no answer to the problem. Has anyone been able to fix this?

How to install curses gem on Windows

How to install curses gem on Windows?
I already tried to do everything mentioned in the answers from this question and still got the same error:
>E:\software\Ruby22\bin\gem install curses
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing curses:
ERROR: Failed to build gem native extension.
E:/software/Ruby22/bin/ruby.exe -r ./siteconf20160411-12372-2bgdm1.rb extconf.rb
checking for tgetent() in -ltinfo... no
checking for tgetent() in -ltermcap... no
checking for ncurses.h... no
checking for ncurses/curses.h... no
checking for ncursesw/curses.h... no
checking for curses_colr/curses.h... no
checking for curses.h... 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=E:/software/Ruby22/bin/$(RUBY_BASE_NAME)
--with-curses-dir
--without-curses-dir
--with-curses-include
--without-curses-include=${curses-dir}/include
--with-curses-lib
--without-curses-lib=${curses-dir}/lib
--with-ncurses-dir
--without-ncurses-dir
--with-ncurses-include
--without-ncurses-include=${ncurses-dir}/include
--with-ncurses-lib
--without-ncurses-lib=${ncurses-dir}/lib
--with-termcap-dir
--without-termcap-dir
--with-termcap-include
--without-termcap-include=${termcap-dir}/include
--with-termcap-lib
--without-termcap-lib=${termcap-dir}/lib
--with-tinfolib
--without-tinfolib
--with-termcaplib
--without-termcaplib
extconf failed, exit code 1
Gem files will remain installed in E:/software/Ruby22/lib/ruby/gems/2.2.0/gems/curses-1.0.2 for inspection.
Results logged to E:/software/Ruby22/lib/ruby/gems/2.2.0/extensions/x86-mingw32/2.2.0/curses-1.0.2/gem_make.out

Failed to install charlock_holmes on Windows 8 due to missing zlib

I'm trying to install charlock_holmes on Windows 8, but I can't point it to a valid zlib binary. I tried vaiours dll's from Cygwin and from zlib.net, with no luck. The question is, how to link to zlib properly?
gem install charlock_holmes -- --with-icu-dir=D:\download\icu4c-4_0_1-Win64-msvc8\usr\local --with-icui18nlib=icuin --with-icudatalib=icudt --with-zlib=WHATHEVER_WONT_WORK
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing charlock_holmes:
ERROR: Failed to build gem native extension.
d:/bin/Ruby193/bin/ruby.exe extconf.rb --with-icu-dir=D:\download\icu4c-4_0_1-Win64-msvc8\usr\local --with-icui18nlib=icuin --with-icudatalib=icudt --with- zlib=WHATHEVER_WONT_WORK
checking for main() in -licuin... yes
checking for main() in -licuin... yes
checking for unicode/ucnv.h... yes
checking for main() in -lWHATHEVER_WONT_WORK... no
libz missing
*** 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=d:/bin/Ruby193/bin/ruby
--with-icu-dir
--with-icu-include
--without-icu-include=${icu-dir}/include
--with-icu-lib
--without-icu-lib=${icu-dir}/lib
--with-icui18nlib
--with-icui18nlib
--with-zlib
Gem files will remain installed in d:/bin/Ruby193/lib/ruby/gems/1.9.1/gems/charlock_holmes-0.7.3 for inspection.
Results logged to d:/bin/Ruby193/lib/ruby/gems/1.9.1/gems/charlock_holmes-0.7.3/ext/charlock_holmes/gem_make.out
libz.a goes to [devkit-dir]/mingw/lib, not [devkit-dir]/lib. Problem solved.

Ruby missing taglib error

On my Ubuntu 14.04 I installed Ruby 2.2.0 using RVM.
I have installed the "taglib" using following command sudo apt-get install libtag1-dev.
However when I try to install a gem I get the following error:
> gem install stream2tracks
Building native extensions. This could take a while...
ERROR: Error installing stream2tracks:
ERROR: Failed to build gem native extension.
/home/dash/.rvm/rubies/ruby-2.2.0-dev/bin/ruby -r ./siteconf20150207-2313-h67sa7.rb extconf.rb
checking for ruby.h... yes
checking for taglib/tag_c.h... 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/dash/.rvm/rubies/ruby-2.2.0-dev/bin/$(RUBY_BASE_NAME)
extconf failed, exit code 1
Gem files will remain installed in /home/dash/.rvm/gems/ruby-2.2.0-dev/gems/taglib2-0.1.5 for inspection.
You need to install libtagc0-dev to get TagLib's C header (the one the gem is checking for).

Resources