Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hitimes require error when running jekyll serve on windows 8.1

Tags:

windows

ruby

I'm trying to run jekyll on my local machine running Windows 8.1, I've got Ruby installed and working but every time I run the jekyll serve command I get the error:

C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- hitimes/hitimes (LoadError)

I've tried installing hitimes manually via gem install hitimes and it works fine, if I open up irb i can require 'hitimes' no problem it just doesn't seem to work for jekyll.

My gem environment is:

RubyGems Environment:
  - RUBYGEMS VERSION: 2.4.5
  - RUBY VERSION: 2.2.1 (2015-02-26 patchlevel 85) [i386-mingw32]
  - INSTALLATION DIRECTORY: C:/Ruby22/lib/ruby/gems/2.2.0
  - RUBY EXECUTABLE: C:/Ruby22/bin/ruby.exe
  - EXECUTABLE DIRECTORY: C:/Ruby22/bin
  - SPEC CACHE DIRECTORY: C:/Users/adam.laycock/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: C:/ProgramData
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mingw32
  - GEM PATHS:
    - C:/Ruby22/lib/ruby/gems/2.2.0
    - C:/Users/adam.laycock/.gem/ruby/2.2.0
  - GEM CONFIGURATION:
    - :update_sources => true
    - :verbose => true
    - :backtrace => false
    - :bulk_threshold => 1000
  - REMOTE SOURCES:
    - https://rubygems.org/
  - SHELL PATH:
    - C:\RubyDevKit\bin
    - C:\RubyDevKit\mingw\bin
    - C:\windows\system32
    - C:\windows
    - C:\windows\System32\Wbem
    - C:\windows\System32\WindowsPowerShell\v1.0\
    - C:\Program Files\nodejs\
    - C:\Users\adam.laycock\AppData\Roaming\npm
    - C:\Users\adam.laycock\AppData\Local\GitHub\PortableGit_c2ba306e536fdf878271f7fe636a147ff37326ad\cmd
    - C:\Users\adam.laycock\AppData\Local\GitHub\PortableGit_c2ba306e536fdf878271f7fe636a147ff37326ad\bin
    - C:\Users\adam.laycock\AppData\Local\GitHub\PortableGit_c2ba306e536fdf878271f7fe636a147ff37326ad\mingw\bin
    - C:\Users\adam.laycock\AppData\Local\Apps\2.0\O3WGNDW8.VMM\C2M3657K.JNR\gith..tion_317444273a93ac29_0002.000a_7c768ac46c12be54
    - C:\windows\Microsoft.NET\Framework\v4.0.30319
    - C:\Ruby22\Bin

jekyll -v returns 2.5.3

like image 486
Arcath Avatar asked Mar 11 '15 11:03

Arcath


2 Answers

It probably has to do with some breaking ABI changes in Ruby 2.2 and hitimes-1.2.2-x86-mingw32 doesn't include the fat binary for it Ruby 2.2.

The fix is to just uninstall and re-install it and use --platform ruby when installing.

So do this:

gem uni hitimes

**Remove ALL versions**

gem ins hitimes -v 1.2.1 --platform ruby

That will recompile hitimes that is compatible with Ruby 2.2.

Edit: As copiousfreetime mentioned in the comments, the RubyInstaller DevKit is required to compile binary rubygems

Versions 1.2.3 and above of hitimes should contain fat binaries for Ruby 2.2.X releases. Thanks copiousfreetime

like image 143
Azolo Avatar answered Sep 19 '22 12:09

Azolo


UPDATE (2015-09-13) Hitimes version 1.2.3 is released which solves this issue.

This is somewhat expected, since hitimes v1.2.2 was released in January, and the first Ruby 2.2 release for Windows was release 1 month ago on March 6. I haven't had a chance to build hitimes for Windows with Ruby 2.2 fat binaries yet. I have opened up an issue for hitimes to release a new fat binary of hitimes that includes support for Ruby 2.2 -- https://github.com/copiousfreetime/hitimes/issues/40

like image 26
copiousfreetime Avatar answered Sep 20 '22 12:09

copiousfreetime