🤔 Re: Windows 10: Jekyll Installation: "Could note find gem 'jekyll (~> 4.1.1) x64-ming32'

Installation

Jekyll version 4.1.1
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x64-mingw32]
gem 3.1.4
Bundler version 2.1.4
Windows 10 version 1903
rubyinstaller-devkit-2.7.2-1-x64.exe

I’ve been attempting to fix this problem with reinstalling ruby (removing PATH to Ruby installation in Windows and any other directories in the C: drive involved with gem and ruby) where whenever I start a new jekyll blog, everything works fine until I type bundle exec jekyll serve I get the following

Could not find gem 'jekyll (~> 4.1.1) x64-mingw32' in any of the gem sources listed in your Gemfile. Run bundle install to install missing gems.

of which case I do type the command bundle install with the following message:

‘‘Bundle Install’ results in…’

Fetching gem metadata from https://rubygems.org/
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies…
Using public_suffix 4.0.6
Using addressable 2.7.0
Using bundler 2.1.4
Using colorator 1.1.0
Using concurrent-ruby 1.1.7
Using eventmachine 1.2.7 (x64-mingw32)
Fetching http_parser.rb 0.6.0
Installing http_parser.rb 0.6.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: G:/vboxshare/Jekyll
Investing/myblog/jekyll-theme-yat/ruby/2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
E:/Ruby27-x64/bin/ruby.exe -I E:/Ruby27-x64/lib/ruby/2.7.0 -r
./siteconf20201009-13560-xjxajt.rb extconf.rb
creating Makefile

current directory: G:/vboxshare/Jekyll
Investing/myblog/jekyll-theme-yat/ruby/2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make “DESTDIR=” clean

current directory: G:/vboxshare/Jekyll
Investing/myblog/jekyll-theme-yat/ruby/2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make “DESTDIR=”
generating ruby_http_parser-x64-mingw32.def
compiling ruby_http_parser.c
x86_64-w64-mingw32-gcc.exe: error:
Investing/myblog/jekyll-theme-yat/ruby/2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser:
No such file or directory
make: *** [Makefile:244: ruby_http_parser.o] Error 1

make failed, exit code 2

Gem files will remain installed in G:/vboxshare/Jekyll
Investing/myblog/jekyll-theme-yat/ruby/2.7.0/gems/http_parser.rb-0.6.0 for
inspection.
Results logged to G:/vboxshare/Jekyll
Investing/myblog/jekyll-theme-yat/ruby/2.7.0/extensions/x64-mingw32/2.7.0/http_parser.rb-0.6.0/gem_make.out

An error occurred while installing http_parser.rb (0.6.0), and Bundler cannot
continue.
Make sure that gem install http_parser.rb -v '0.6.0' --source 'https://rubygems.org/' succeeds before bundling.

In Gemfile:
minima was resolved to 2.5.1, which depends on
jekyll-feed was resolved to 0.15.1, which depends on
jekyll was resolved to 4.1.1, which depends on
em-websocket was resolved to 0.5.2, which depends on
http_parser.rb`

And so …

And whenever I type jekyll serve I get the following

Could not find gem ‘jekyll (~> 4.1.1) x64-mingw32’ in any of the gem sources listed in your Gemfile.
Run bundle install to install missing gems.

A clue

One thing that I have a clue is that when I type jekyll build I get the following:

Traceback (most recent call last):
15: from E:/Ruby27-x64/bin/jekyll:23:in <main>' 14: from E:/Ruby27-x64/bin/jekyll:23:in load’
13: from E:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/exe/jekyll:11:in <top (required)>' 12: from E:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/plugin_manager.rb:52:in require_from_bundler’
11: from E:/Ruby27-x64/lib/ruby/2.7.0/bundler.rb:149:in setup' 10: from E:/Ruby27-x64/lib/ruby/2.7.0/bundler/runtime.rb:20:in setup’
9: from E:/Ruby27-x64/lib/ruby/2.7.0/bundler/runtime.rb:101:in block in definition_method' 8: from E:/Ruby27-x64/lib/ruby/2.7.0/bundler/definition.rb:226:in requested_specs’
7: from E:/Ruby27-x64/lib/ruby/2.7.0/bundler/definition.rb:237:in specs_for' 6: from E:/Ruby27-x64/lib/ruby/2.7.0/bundler/definition.rb:170:in specs’
5: from E:/Ruby27-x64/lib/ruby/2.7.0/bundler/definition.rb:258:in resolve' 4: from E:/Ruby27-x64/lib/ruby/2.7.0/bundler/resolver.rb:22:in resolve’
3: from E:/Ruby27-x64/lib/ruby/2.7.0/bundler/resolver.rb:49:in start' 2: from E:/Ruby27-x64/lib/ruby/2.7.0/bundler/resolver.rb:258:in verify_gemfile_dependencies_are_found!’
1: from E:/Ruby27-x64/lib/ruby/2.7.0/bundler/resolver.rb:258:in each' E:/Ruby27-x64/lib/ruby/2.7.0/bundler/resolver.rb:290:in block in verify_gemfile_dependencies_are_found!’: Could not find gem ‘minima (~> 2.5) x64-mingw32’ in any of the gem sources listed in your Gemfile. (Bundler::GemNotFound)

:thinking:

Mind you I have done the following: reinstalled ruby, bundle and jekyll, made sure to do complete uninstalls and clean reinstalls of ruby and made sure that I have all of ruby uninstalled from the system.

After installing Ruby on Windows, did you run ridk install ?
If no, please run and follow onscreen instructions.
If yes, you may additionally need to run ridk enable prior to running bundle install

As long as you keep seeing the following message, you won’t be able to use Jekyll properly:

Installing http_parser.rb 0.6.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

Yes I believe so as I made sure there was a checkbox that asked about whether I wanted to run ridk install or not followed by a command line prompt of which, curiously, there is only by default now, options 1 and 3 to be the automatic actions once you just hit the Enter key.

rubyinstaller-devkit-2.7.2-1-x64.tmp_2020-10-09_14-13-13_edit

This is the part where, honestly, I am lost :sweat_smile:

Did you just press enter there? I think that is what I did and it worked fine.

Pretty sure your problem is that the ruby devkit is not working/installed. I think that is what the ridk thing does now, used to be a different installer. The devkit is what allows the gem native extensions to be built. Looks like the devkit is now MSYS2, this post on SO has some info on how to tell if that is installed:

No I didn’t I entered 1, 2, and 3 respectively.

…that is what the ridk thing does now, used to be a different installer.

What particular and what is it about the installer that makes a difference? Because, indeed, there is a difference here compared to older versions of RubyInstaller for Windows for sure in this part.

As for finding if MSYS2 is installed or not, it is

Now try running gem install http_parser.rb in a new terminal window.
If that succeeds, your Ruby installation is fine.
If it doesn’t, try running ridk enable in the terminal window and run gem install http_parser.rb

If that fails as well…, uninstall everything from RubyInstaller and reinstall Ruby, this time just pressing the Enter key.

Ready to go, let’s party!

Followed your instructions and got prompted with the following:

gem install http_parser.rb
prompted with:

Fetching http_parser.rb-0.6.0.gem
Temporarily enhancing PATH for MSYS/MINGW…
Building native extensions. This could take a while…
Successfully installed http_parser.rb-0.6.0
Parsing documentation for http_parser.rb-0.6.0
unknown encoding name “chunked\r\n\r\n25” for ext/ruby_http_parser/vendor/http-parser-java/tools/parse_tests.rb, skipping
Installing ri documentation for http_parser.rb-0.6.0
Done installing documentation for http_parser.rb after 3 seconds
1 gem installed

After that I started a new blog
jekyll new testblog
Prompted with:

Running bundle install in G:/vboxshare/Jekyll Investing/testblog…
Bundler: Fetching gem metadata from https://rubygems.org/
Bundler: Fetching gem metadata from https://rubygems.org/.
Bundler: Resolving dependencies…
Bundler: Fetching public_suffix 4.0.6
Bundler: Installing public_suffix 4.0.6
Bundler: Fetching addressable 2.7.0
Bundler: Installing addressable 2.7.0
Bundler: Using bundler 2.1.4
Bundler: Fetching colorator 1.1.0
Bundler: Installing colorator 1.1.0
Bundler: Fetching concurrent-ruby 1.1.7
Bundler: Installing concurrent-ruby 1.1.7
Bundler: Fetching eventmachine 1.2.7 (x64-mingw32)
Bundler: Installing eventmachine 1.2.7 (x64-mingw32)
Bundler: Fetching http_parser.rb 0.6.0
Bundler: Installing http_parser.rb 0.6.0 with native extensionsGem::Ext::BuildError: ERROR: Failed to build gem native extension.
Bundler:
Bundler: current directory: G:/vboxshare/Jekyll
Bundler: Investing/testblog/jekyll-theme-yat/ruby/2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
Bundler: E:/Ruby27-x64/bin/ruby.exe -I E:/Ruby27-x64/lib/ruby/2.7.0 -r
Bundler: ./siteconf20201010-15448-b6bxom.rb extconf.rb
Bundler: creating Makefile
Bundler:
Bundler: current directory: G:/vboxshare/Jekyll
Bundler: Investing/testblog/jekyll-theme-yat/ruby/2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
Bundler: make “DESTDIR=” clean
Bundler:
Bundler: make “DESTDIR=”
Bundler: generating ruby_http_parser-x64-mingw32.def
Bundler: x86_64-w64-mingw32-gcc.exe: error:
Bundler: Investing/testblog/jekyll-theme-yat/ruby/2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser:
Bundler: No such file or directory
Bundler: make: *** [Makefile:244: ruby_http_parser.o] Error 1
Bundler:
Bundler: make failed, exit code 2
Bundler:
Bundler: Gem files will remain installed in G:/vboxshare/Jekyll
Bundler: Investing/testblog/jekyll-theme-yat/ruby/2.7.0/gems/http_parser.rb-0.6.0 for
Bundler: inspection.
Bundler: Results logged to G:/vboxshare/Jekyll
Bundler: Investing/testblog/jekyll-theme-yat/ruby/2.7.0/extensions/x64-mingw32/2.7.0/http_parser.rb-0.6.0/gem_make.out
Bundler: An error occurred while installing http_parser.rb (0.6.0), and Bundler cannot
Bundler: continue.
Bundler: Make sure that gem install http_parser.rb -v '0.6.0' --source Bundler: 'https://rubygems.org/' succeeds before bundling.
Bundler:
Bundler: In Gemfile:
Bundler: minima was resolved to 2.5.1, which depends on
Bundler: jekyll-feed was resolved to 0.15.1, which depends on
Bundler: em-websocket was resolved to 0.5.2, which depends on
Bundler: http_parser.rb

changed to the testblog directory and then tried to serve it

Buuuuut…

bundle exec jekyll serve
Prompted with:

Could not find gem ‘jekyll (~> 4.1.1) x64-mingw32’ in any of the gem sources listed in your Gemfile.
Run bundle install to install missing gems.

Entered bundle install and was prompted with:

Fetching gem metadata from https://rubygems.org/
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies…
Using public_suffix 4.0.6
Using addressable 2.7.0
Using bundler 2.1.4
Using colorator 1.1.0
Using concurrent-ruby 1.1.7
Using eventmachine 1.2.7 (x64-mingw32)
Fetching http_parser.rb 0.6.0
Installing http_parser.rb 0.6.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: G:/vboxshare/Jekyll
Investing/testblog/jekyll-theme-yat/ruby/2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
E:/Ruby27-x64/bin/ruby.exe -I E:/Ruby27-x64/lib/ruby/2.7.0 -r
./siteconf20201010-13620-r50228.rb extconf.rb
creating Makefile

current directory: G:/vboxshare/Jekyll
Investing/testblog/jekyll-theme-yat/ruby/2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make “DESTDIR=” clean

current directory: G:/vboxshare/Jekyll
Investing/testblog/jekyll-theme-yat/ruby/2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make “DESTDIR=”
generating ruby_http_parser-x64-mingw32.def
compiling ruby_http_parser.c
x86_64-w64-mingw32-gcc.exe: error:
Investing/testblog/jekyll-theme-yat/ruby/2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser:
No such file or directory
make: *** [Makefile:244: ruby_http_parser.o] Error 1

make failed, exit code 2

Gem files will remain installed in G:/vboxshare/Jekyll
Investing/testblog/jekyll-theme-yat/ruby/2.7.0/gems/http_parser.rb-0.6.0 for
inspection.
Results logged to G:/vboxshare/Jekyll
Investing/testblog/jekyll-theme-yat/ruby/2.7.0/extensions/x64-mingw32/2.7.0/http_parser.rb-0.6.0/gem_make.out

An error occurred while installing http_parser.rb (0.6.0), and Bundler cannot
continue.
Make sure that gem install http_parser.rb -v '0.6.0' --source 'https://rubygems.org/' succeeds before bundling.

In Gemfile:
minima was resolved to 2.5.1, which depends on
jekyll-feed was resolved to 0.15.1, which depends on
jekyll was resolved to 4.1.1, which depends on
em-websocket was resolved to 0.5.2, which depends on
http_parser.rb

Back to Basics and unhappy surprise :scream: .

Then I remembered something from https://jekyllrb.com/docs/installation/#requirements

Requirements:

  • Ruby version 2.5.0 or higher, including all development headers (check your Ruby version using ruby -v )
  • RubyGems (check your Gems version using gem -v )>
  • GCC and Make (check versions using gcc -v , g++ -v , and make -v )

So then went ahead and checked if I had gcc, g++, and make installed.

And I got a very surprising prompts:

PS G:\vboxshare\Jekyll Investing\testblog> gcc -v
Using built-in specs.
Target: mingw32
 Configured with: ../src/gcc-8.2.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 -- 
 target=mingw32 --prefix=/mingw --disable-win32-registry --with-arch=i586 --with-tune=generic -- 
 enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-8.2.0-3' -- 
 with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --enable-static --enable-shared --enable- 
 threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv- 
 prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --with-isl=/mingw --enable- 
libgomp --disable-libvtv --enable-nls --disable-build-format-warnings
Thread model: win32
gcc version 8.2.0 (MinGW.org GCC-8.2.0-3)

PS G:\vboxshare\Jekyll Investing\testblog> g++ -v
g++ : The term 'g++' is not recognized as the name of a cmdlet, function, script file, or operable 
program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ g++ -v
+ ~~~
+ CategoryInfo          : ObjectNotFound: (g++:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

PS G:\vboxshare\Jekyll Investing\testblog> make -v
make : The term 'make' is not recognized as the name of a cmdlet, function, script file, or operable 
program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ make -v
+ ~~~~
+ CategoryInfo          : ObjectNotFound: (make:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

So g++ and make are missing :scream: , which has made me wonder if there are others with Windows 10 installations having this problem or not. And if there are if it’s a problem with uniform constancy or if it’s just for some Windows 10 instances.

Because I’m beginning to wonder, for testing purposes, to try an older version of RubyInstaller (I’m thinking versions 2.4.10-1 (x64), 2.5.8-2(x64), 2.6.6-2(x64) ):thinking: :test_tube:

I’ll update after doing these tests. So far so good people thank you for responding! :smile:

I’m guessing you have more than one ruby installed - initially it looked like it was on E:/Ruby27-x64/lib/ruby/2.7.0 now it looks like it is in the directory you are in?

G:/vboxshare/Jekyll Investing/testblog/jekyll-theme-yat/ruby/2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser

if you look in both those locations is ruby there? many times it seems people end up with ruby twice and it looks for some stuff in one bin and other stuff in the other and never finds all of it.

Any installation of Ruby in Windows 10 via RubyInstaller is system-wide. That is Windows 10’s system’s PATH registers the installation and can therefore work regardless of what mounted device you invoke ruby in.

As for that directory, .../jekyll-theme-yat/ruby/2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser

That’s for this theme that I was trying out earlier before I encountered this problem.

Considering that the basic directory structure of your typical, fresh installation of Jekyll doesn’t include this directory branch (https://jekyllrb.com/docs/structure/)

But good pointing out that because it’s going to be a lead to take into account because I don’t recall having installed that theme in post-recent fresh RubyInstaller instance.

As stated in my earlier post, I’ll be doing some testing and digging around. I may check out RubyInstaller’s Github or forums to see what’s happening there and whatever I find I’ll post on here.

Stay tuned! :mantelpiece_clock: