Error installing jekyll: ERROR: Failed to build gem native extension
Clash Royale CLAN TAG#URR8PPP
Error installing jekyll: ERROR: Failed to build gem native extension
I use github+jekyll to build blog, i try to install jekyll to local(windows 10), while it failed when i rungem install jekyll
and the stack trace is
gem install jekyll
C:DevelopmentsFrontEndrubygems-2.7.7>gem install jekyll
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
current directory: C:/Developments/FrontEnd/Ruby25-x64/lib/ruby/gems/2.5.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
C:/Developments/FrontEnd/Ruby25-x64/bin/ruby.exe -r ./siteconf20180806-33956-l8y76h.rb extconf.rb
creating Makefile
current directory: C:/Developments/FrontEnd/Ruby25-x64/lib/ruby/gems/2.5.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR=" clean
'make' is not recognized as an internal or external command,
operable program or batch file.
current directory: C:/Developments/FrontEnd/Ruby25-x64/lib/ruby/gems/2.5.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR="
'make' is not recognized as an internal or external command,
operable program or batch file.
make failed, exit code 1
what i do is:
1. install ruby, path variable was set, version: ruby 2.5.1p57 (2018-03-29 revision 63029) [x64-mingw32]
.
2. install rubygems, version: 2.7.7
.
3. install MSYS2.
4. install jekyll, gem install jekyll
, then the above error occurs and i'm not sure the reason.
ruby 2.5.1p57 (2018-03-29 revision 63029) [x64-mingw32]
2.7.7
gem install jekyll
i have tried to install devkit and it not works, i think my ruby version is 2.5+, so don't need devkit and i have uninstalled it.
Anyone could help me?
MSYS
MingW
2.5+
@ForeverZer0 helpful, I re-install Ruby with DevKit, now it works, jekyll could installed.
– KD Final
Aug 6 at 6:45
They did make separate downloads for the Windows installer that do not include DevKit, but is practically a necessity. It is quite necessary to be able to use a large percentage extremely popular gems.
– ForeverZer0
Aug 6 at 7:05
@ForeverZer0 could you add this answer not in comments, then i can accept your answer.
– KD Final
Aug 6 at 7:12
No problem, I made a post for ya :)
– ForeverZer0
Aug 6 at 7:33
1 Answer
1
Although they made the Ruby+DevKit an "optional" download for the RubyInstaller on Windows, if you plan to install gems, it is practically a necessity. A large percentage of the most popular gems are C extension that will need built on your machine when being installed.
The DevKit is a handy toolchain that supplies everything you need for this to be done, automatically without you needed to do anything more than type gem install XXXXX
. Without it, you either cannot use C extension gems, or must have already installed MSYS
and MingW
, have them configured properly, which is all not a user-friendly experience, even for those who familiar with the process.
gem install XXXXX
MSYS
MingW
So even if DevKit is optional, it is still required to make the most of Ruby on Windows.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
1. You still need devkit for Ruby 2.5+ to install C extension gems (doubtful you have set up
MSYS
andMingW
independently of Ruby based on this question. Unsure why you would feel it is not needed for2.5+
2. RubyGems is already packaged with Ruby, you don't need to install it.– ForeverZer0
Aug 6 at 3:53