šŸ¤” 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 Installation | Jekyll ā€¢ Simple, blog-aware, static sites

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:

Update! :clock11:

A curious thing after testing. I remembered that I had installed Ubuntu for Windows 10 and then I started to see if I had Ruby installed or not.

I saw that I had Ruby installed and then I went ahead and uninstalled completely from the Ubuntu installation.

After which, I tested Ruby installer versions (as per previous post), and then had the same problems.

But, I reinstalled ruby in Ubuntu and then did as per the instructions on the Quick Start and it now works!

Yes thatā€™s good butā€¦ :thinking:

The thing is that now Iā€™m wondering if, after the first time I had installed Ruby and Jekyll nā€™ gems via Ubuntu for Windows 10, and even after having uninstalled it, had the files stayed and messed with the PATHing for RubyInstaller?

I donā€™t know if anyone out here can test that out because I believe there may be some relationship with what gets priority for the PATH when it comes to Ruby installations via Ubuntu for Windows 10 versus RubyInstaller.

This means that if you install Ruby, Jekyll nā€™ Gems on Ubuntu, you canā€™t install Jekyll nā€™ Gems via RubyInstaller.

But anyway I leave that here as food for thought in case anyone finds themselves in a pickle

To recap :warning:

So, if a) have installed Ubuntu or any Linux distro on Windows 10 and have already installed Ruby and Jekyll on it, keep in mind that it may cause b) your RubyInstaller based method of installing Ruby, Jekyll nā€™ Gems installation from working at all as expected.

NOTE I still have to figure out how things are installed on the Windows 10 host directories in the C:\ drive as what the whole Bash On Windows thing is just something akin to virtual machines running Linux distros, except there is some sharing of PATH resources and system access from the guest OS installation (*nix distro) to the host OS installation (Win 10)