8

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

1
  • In such cases, it would have been a good idea to raise this problem on their bug tracker. That way, this issue might have a chance to be fixed. I took the liberty of adding the problem: github.com/copiousfreetime/hitimes/issues/39
    – amenthes
    Apr 7, 2015 at 17:30

2 Answers 2

21

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

3
  • 2
    This will only work if you have the windows ruby DevKit installed. Hitimes uses a C extension and requires a compiler to build for source. Apr 7, 2015 at 19:07
  • 4
    For me it worked with gem ins hitimes -v 1.2.2 --platform ruby
    – kiewic
    May 30, 2015 at 16:12
  • I've released version 1.2.3 of hitimes which includes a fatbinary version for windows so the devkit is not longer necessary for hitimes installation on windows. Sep 13, 2015 at 8:19
2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.