J'ai essayé d'installer taglib-ruby pour Ruby sous Windows, mais je n'arrive pas à comprendre comment indiquer à l'installateur de gem où chercher ma copie de taglib. L'installateur regarde dans/usr/local/et d'autres endroits comme celui-ci, mais étant donné qu'il s'agit d'une machine Windows, ces emplacements n'existent pas et je ne peux donc pas y déplacer taglib. J'ai vu this post sur la page github pour la gemme, qui vous indique de spécifier l'emplacement en utilisant ce format: CONFIGURE_ARGS="--with-opt-dir=Path/to/taglib" gem install taglib-ruby
, mais cela ne fonctionne pas dans le PowerShell de Windows. J'ai également essayé cette formulation: gem install taglib-ruby -- 'CONFIGURE_ARGS="--with-opt-dir=Path/to/taglib/"'
. Mais cela ne fonctionne pas non plus.Installation de taglib-ruby gem sur Windows
Le message d'erreur que je vois est:
Temporarily enhancing PATH to include DevKit... Building native
extensions with: '--with-opt-dir=/hi/' This could take a while...
ERROR: Error installing taglib-ruby:
ERROR: Failed to build gem native extension.
current directory: C:/XXXXXXX/taglib_base C:/XXXXX/ruby.exe -r ./siteconf20161010-10032-1260rq7.rb extconf.rb --with-opt-dir=/hi/
checking for main() in -lstdc++... yes
checking for main() in -ltag... no
You must have taglib installed in order to use taglib-ruby.
Debian/Ubuntu: sudo apt-get install libtag1-dev
Fedora/RHEL: sudo yum install taglib-devel
Brew: brew install taglib
MacPorts: sudo port install taglib
*** 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
--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:/Ruby23-x64/bin/$(RUBY_BASE_NAME)
--with-tag-dir
--without-tag-dir
--with-tag-include
--without-tag-include=${tag-dir}/include
--with-tag-lib
--without-tag-lib=${tag-dir}/lib
--with-stdc++lib
--without-stdc++lib
--with-taglib
--without-taglib
To see why this extension failed to compile, please check the mkmf.log
which can be found here:...
Vous pouvez voir que --with-opt-dir est une option, mais ce n'est pas réglé, même si l'appel montre qu'il était. Des idées sur la façon de faire fonctionner cela?
Remarque: J'ai également essayé de définir des variables d'environnement pour "with-opt-dir" et "CONFIGURE_ARGS", mais elles ont également échoué.