Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jekyll serve: cannot load such file hitimes/hitimes (LoadError) #3814

Closed
mgiuffrida opened this issue Jun 24, 2015 · 4 comments
Closed

jekyll serve: cannot load such file hitimes/hitimes (LoadError) #3814

mgiuffrida opened this issue Jun 24, 2015 · 4 comments

Comments

@mgiuffrida
Copy link
Contributor

Windows 8.1 x64. Trying to follow Github.com instructions for gh-pages with jekyll, first time messing with Ruby in quite a while.

Gemfile:

source 'https://rubygems.org'
gem 'github-pages'

bundle install succeeds
bundle exec jekyll serve fails: D:/dev/Ruby22/lib/ruby/gems/2.2.0/gems/hitimes-1.2.2-x86-mingw32/lib/hitimes.rb: 37:in```require': cannot load such file -- hitimes/hitimes (LoadError)

After searching the interwebs, I've tried:

  • gem uni hitimes
  • gem ins hitimes -v 1.2.1 --platform ruby

Error persists.

  • gem update --system 2.3.0

Error persists.

Maybe this is an issue with Ruby on Windows?

> ruby -e "require 'hitimes'" -e 'puts Hitimes.measure { sleep 0.1 }'
D:/dev/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in
 `require': cannot load such file -- hitimes/hitimes (LoadError)
    from D:/dev/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from D:/dev/Ruby22/lib/ruby/gems/2.2.0/gems/hitimes-1.2.2-x86-mingw32/lib/hitimes.rb:37:in `rescue in <top (required)>'
    from D:/dev/Ruby22/lib/ruby/gems/2.2.0/gems/hitimes-1.2.2-x86-mingw32/lib/hitimes.rb:32:in `<top (required)>'
    from D:/dev/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:135:in `require'
    from D:/dev/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
    from D:/dev/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:144:in `require'
    from -e:1:in `<main>'
@parkr
Copy link
Member

parkr commented Jun 24, 2015

Yeah, this is a problem with your environment, unfortunately. hitimes has C extensions, which can sometimes not compile properly. Try re-installing the gem. Other than that, we can't be of much help. :(

@parkr parkr closed this as completed Jun 24, 2015
@mgiuffrida
Copy link
Contributor Author

Thanks parkr. Somehow trying again this morning I was able to find the solution: hitimes simply doesn't support Ruby 2.2 on Windows yet. copiousfreetime/hitimes#40

Downgrading to Ruby 2.1 allows me to run jekyll serve. I'm leaving this here in case some other lost soul comes across this error (e.g., by following the GitHub pages instructions).

@envygeeks
Copy link
Contributor

@mgiuffrida you can actually edit our Windows gotchas if you want and add that little note: https://github.com/jekyll/jekyll/blob/master/site/_docs/windows.md

@vincentntang
Copy link

vincentntang commented Aug 26, 2016

thanks mgiuffrida I've been looking everywhere for this, this is the exact error I got and I'm also running windows 8.1. I remember reading about some windows versions not working with the newest versions of ruby

Going back I reran the problem again. This time with Ruby 2.1.9 environment. Results:

image

So steps taken: (I run windows 8.1)
Install ruby 2.1.9
Install devkit (you linked it above)

command prompt stuff:

gem install jekyll
gem install github-pages
gem install bundler (this fixed the issue)

jekyll new . (wherever you specify the folder for the site)
jekyll serve

it worked

@jekyll jekyll locked and limited conversation to collaborators Jun 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants