I am new to ruby and wanted to add responsive images to my site. I decided to use jekyll-responsive-image
. When the install gave me issues, I installed ImageMagick, thinking it was a dependency, following this. Then tried to install rmagick (assuming it is also a dependency) using both
gem install rmagick -v '4.1.2' --source 'https://rubygems.org/'
and
gem install rmagick --platform=ruby -- --with-opt-lib='C:/ImageMagick-7.0.10-Q16-HDRI/lib' --with-opt-include='C:/ImageMagick-7.0.10-Q16-HDRI/include'
The output of these are
checking for Ruby version >= 2.3.0... yes
checking for magick... 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=${opt-dir}/include
--with-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby27-x64/bin/$(RUBY_BASE_NAME)
extconf.rb:301:in `assert_has_dev_libs!': invalid byte sequence in UTF-8 (ArgumentError)
from extconf.rb:267:in `assert_can_compile!'
from extconf.rb:18:in `initialize'
from extconf.rb:395:in `new'
from extconf.rb:395:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Ruby27-x64/lib/ruby/gems/2.7.0/extensions/x64-mingw32/2.7.0/rmagick-4.1.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rmagick-4.1.2 for inspection.
The log does not look helpful
assert_minimum_ruby_version!: checking for Ruby version >= 2.3.0... -------------------- yes
--------------------
find_executable: checking for magick... -------------------- yes
--------------------
It looks like the invalid byte sequence error is stopping me from installing any new gems. Based on other questions on stack overflow, I've tried to check that my path does not contain any specially characters. From this post, I set the user environment variables of LANG, LANGUAGE, and LC_ALL to en_US.UTF-8, and LC_CTYPE to C.BINARY. RUBYOPT is set to -Eutf-8.
How can I solve this error? Keep in mind I'm on Windows 10. Thank you