Load Error - Cannot load such file -- hitimes 1.2.2 #32

Closed
KartikKannapur opened this Issue Dec 21, 2014 · 17 comments

Projects

None yet

8 participants

@KartikKannapur

I have a blog that runs on jekyll. I use Mac OS X v 10.9.5. When I run $ bundle exec jekyll serve, I received the following error .

/Library/Ruby/Gems/2.0.0/gems/hitimes-1.2.2/lib/hitimes.rb:37:in `require': cannot load such file -- hitimes/hitimes (LoadError)
from /Library/Ruby/Gems/2.0.0/gems/hitimes-1.2.2/lib/hitimes.rb:37:in `rescue in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/hitimes-1.2.2/lib/hitimes.rb:32:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/timers-4.0.1/lib/timers/group.rb:4:in `require'
from /Library/Ruby/Gems/2.0.0/gems/timers-4.0.1/lib/timers/group.rb:4:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/timers-4.0.1/lib/timers.rb:4:in `require'
from /Library/Ruby/Gems/2.0.0/gems/timers-4.0.1/lib/timers.rb:4:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/celluloid-0.16.0/lib/celluloid/receivers.rb:3:in `require'
from /Library/Ruby/Gems/2.0.0/gems/celluloid-0.16.0/lib/celluloid/receivers.rb:3:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/celluloid-0.16.0/lib/celluloid.rb:475:in `require'
from /Library/Ruby/Gems/2.0.0/gems/celluloid-0.16.0/lib/celluloid.rb:475:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/listen-2.7.11/lib/listen.rb:1:in `require'
from /Library/Ruby/Gems/2.0.0/gems/listen-2.7.11/lib/listen.rb:1:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-watch-1.1.2/lib/jekyll/watcher.rb:25:in `require'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-watch-1.1.2/lib/jekyll/watcher.rb:25:in `build_listener'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-watch-1.1.2/lib/jekyll/watcher.rb:6:in `watch'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.1/lib/jekyll/commands/build.rb:68:in `watch'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.1/lib/jekyll/commands/build.rb:38:in `process'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.1/lib/jekyll/commands/serve.rb:26:in `block (2 levels) in init_with_program'
from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.4/lib/mercenary/command.rb:220:in `call'
from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.4/lib/mercenary/command.rb:220:in `block in execute'
from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.4/lib/mercenary/command.rb:220:in `each'
from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.4/lib/mercenary/command.rb:220:in `execute'
from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.4/lib/mercenary/program.rb:35:in `go'
from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.4/lib/mercenary.rb:22:in `program'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.1/bin/jekyll:20:in `<top (required)>'
from /usr/local/bin/jekyll:23:in `load'
from /usr/local/bin/jekyll:23:in `<main>'

I followed issue #17 and I have attached some of the outputs that may be helpful

$ gem env

/usr/local/lib/ruby/site_ruby/2.1.0/rubygems/commands/environment_command.rb:151: warning: Insecure world writable dir /usr in PATH, mode 040777


RubyGems Environment:
- RUBYGEMS VERSION: 2.4.5
  - RUBY VERSION: 2.1.3 (2014-09-19 patchlevel 242) [x86_64-darwin13.0]
  - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/2.1.0
  - RUBY EXECUTABLE: /usr/local/Cellar/ruby/2.1.3/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/local/bin
  - SPEC CACHE DIRECTORY: /Users/kartik/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /usr/local/Cellar/ruby/2.1.3/etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-13
  - GEM PATHS:
     - /usr/local/lib/ruby/gems/2.1.0
     - /Users/kartik/.gem/ruby/2.1.0
     - /usr/local/Cellar/ruby/2.1.3/lib/ruby/gems/2.1.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /usr/local/bin
     - /usr/local/sbin
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin
     - /opt/X11/bin

$ gem list

*** LOCAL GEMS ***

bigdecimal (1.2.4)
blankslate (2.1.2.4)
celluloid (0.16.0)
classifier-reborn (2.0.2)
coffee-script (2.3.0)
coffee-script-source (1.8.0)
colorator (0.1)
execjs (2.2.2)
fast-stemmer (1.0.2)
ffi (1.9.6)
hitimes (1.2.2)
io-console (0.4.2)
jekyll (2.5.2)
jekyll-coffeescript (1.0.1)
jekyll-gist (1.1.0)
jekyll-paginate (1.1.0)
jekyll-sass-converter (1.3.0)
jekyll-watch (1.2.0)
json (1.8.1)
kramdown (1.5.0)
liquid (2.6.1)
listen (2.8.4)
mercenary (0.3.5)
minitest (4.7.5)
parslet (1.5.0)
posix-spawn (0.3.9)
psych (2.0.5)
pygments.rb (0.6.0)
rake (10.1.0)
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
rdoc (4.1.0)
redcarpet (3.2.2)
rubygems-update (2.4.5)
safe_yaml (1.0.4)
sass (3.4.9)
test-unit (2.1.3.0)
timers (4.0.1)
toml (0.1.2)
yajl-ruby (1.1.0)

$ which jekyll

/usr/local/bin/jekyll

Do let me know if I need to post any other output that could help you assess the issue. Thanks in advance.

@copiousfreetime
Owner

Can you load it with just ruby ruby -e "require 'hitimes'" -e 'puts Hitimes.measure { sleep 0.1 }'.

Also, just to make sure it is installed alright can you do a tree /Library/Ruby/Gems/2.0.0/gems/hitimes-1.2.2/ and also ls -l /Library/Ruby/Gems/2.0.0/gems/hitimes-1.2.2/lib//hitimes/*/.

For that latter one I beleive on your installation, you should have a file /Library/Ruby/Gems/2.0.0/gems/hitimes-1.2.2/lib/hitimes/2.0/hitimes.bundle. If that file is not there then it looks like hitimes did not get installed correctly. If this is the case, then run gem pristine hitimes and that should reinstall it.

Let me know if this helps. Feel free to paste all the results into here and we'll go from there.

@copiousfreetime
Owner

@KartikKannapur I also think part of the problem is you have 2 versions of ruby that ware working at cross purposes with each other some how. If you 'll look at the top paste you put in here, you'll see that jekyll is using the system level rubygems (/Library/Ruby/Gems/2.0.0/gems/) and when you pasted gem env it showed up a version of ruby installed in /usr/local/. So, another possibility is that jekyll is executing the system level instead of the /usr/local/bin/ruby.

How did you install jekyll?

@KartikKannapur

Thanks @copiousfreetime for the quick reply.

I installed jekyll via

$ gem install jekyll

Also, as you mentioned I ran it with

ruby -e "require 'hitimes'" -e 'puts Hitimes.measure { sleep 0.1 }'

the output I got was

/Library/Ruby/Gems/2.0.0/gems/bundler-1.7.7/lib/bundler/vendor/thor/shell/basic.rb:355: warning: Insecure world writable dir /usr in PATH, mode 040777

I also execute the tree command in the path you had mentioned - /Library/Ruby/Gems/2.0.0/gems/hitimes-1.2.2/, the ouput was the following

|-examples
|-ext
|---hitimes
|-----c
|-----java
|-------src
|---------hitimes
|-lib
|---hitimes
|-----2.0
|-spec
|-tasks

The ls -l command gave me

total 88
-rwxr-xr-x  1 root  wheel  43308 Oct 12 02:02 hitimes.bundle

The file seems to be there as you mentioned.

@KartikKannapur

I resolved this issue. As you mentioned there was a problem with the path from which ruby was executing. Thanks for your help.

@copiousfreetime
Owner

@KartikKannapur good to know, let me know if you have any other issues.

@pcatkins

I am having a very similar issue, I am trying to create a blog that runs on jekyll.

When I try to run,
$bundle exec jekyll serve
I get the following error:

            Source: /home/pcatkins/Documents/Portfolio
       Destination: /home/pcatkins/Documents/Portfolio/_site
      Generating... 
                    done.
/home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/hitimes-1.2.2/lib/hitimes.rb:37:in `require': cannot load such file -- hitimes/hitimes (LoadError)
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/hitimes-1.2.2/lib/hitimes.rb:37:in `rescue in <top (required)>'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/hitimes-1.2.2/lib/hitimes.rb:32:in `<top (required)>'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/timers-4.0.1/lib/timers/group.rb:4:in `require'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/timers-4.0.1/lib/timers/group.rb:4:in `<top (required)>'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/timers-4.0.1/lib/timers.rb:4:in `require'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/timers-4.0.1/lib/timers.rb:4:in `<top (required)>'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/celluloid-0.16.0/lib/celluloid/receivers.rb:3:in `require'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/celluloid-0.16.0/lib/celluloid/receivers.rb:3:in `<top (required)>'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/celluloid-0.16.0/lib/celluloid.rb:475:in `require'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/celluloid-0.16.0/lib/celluloid.rb:475:in `<top (required)>'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/listen-2.9.0/lib/listen.rb:1:in `require'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/listen-2.9.0/lib/listen.rb:1:in `<top (required)>'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/jekyll-watch-1.2.1/lib/jekyll/watcher.rb:26:in `require'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/jekyll-watch-1.2.1/lib/jekyll/watcher.rb:26:in `build_listener'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/jekyll-watch-1.2.1/lib/jekyll/watcher.rb:7:in `watch'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/jekyll-2.4.0/lib/jekyll/commands/build.rb:67:in `watch'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/jekyll-2.4.0/lib/jekyll/commands/build.rb:37:in `process'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/jekyll-2.4.0/lib/jekyll/commands/serve.rb:25:in `block (2 levels) in init_with_program'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/gems/jekyll-2.4.0/bin/jekyll:18:in `<top (required)>'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/bin/jekyll:23:in `load'
    from /home/pcatkins/Documents/Portfolio/_vendor/bundle/ruby/2.0.0/bin/jekyll:23:in `<main>'

$gem list

*** LOCAL GEMS ***

bigdecimal (1.2.0)
blankslate (3.1.3, 2.1.2.4)
bundler (1.8.4)
celluloid (0.16.0)
classifier-reborn (2.0.3)
coffee-script (2.3.0)
coffee-script-source (1.9.1)
colorator (0.1)
execjs (2.4.0)
fast-stemmer (1.0.2)
ffi (1.9.6)
hitimes (1.2.2)
io-console (0.4.2)
jekyll-coffeescript (1.0.1)
jekyll-gist (1.1.0)
jekyll-paginate (1.1.0)
jekyll-sass-converter (1.3.0)
jekyll-watch (1.2.1)
json (1.8.2, 1.7.7)
kramdown (1.6.0)
liquid (3.0.1, 2.6.2)
listen (2.9.0)
mercenary (0.3.5)
minitest (5.5.1, 4.3.2)
parslet (1.6.2, 1.5.0)
posix-spawn (0.3.10)
power_assert (0.2.3)
psych (2.0.13, 2.0.0)
pygments.rb (0.6.2)
rake (10.4.2, 0.9.6)
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
rdoc (4.2.0, 4.0.0)
redcarpet (3.2.2)
safe_yaml (1.0.4)
sass (3.4.13)
test-unit (3.0.9, 2.0.0.0)
timers (4.0.1)
toml (0.1.2)
yajl-ruby (1.2.1)

$gem env

RubyGems Environment:
  - RUBYGEMS VERSION: 2.0.0
  - RUBY VERSION: 2.0.0 (2013-02-24 patchlevel 0) [i686-linux]
  - INSTALLATION DIRECTORY: /home/pcatkins/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0
  - RUBY EXECUTABLE: /home/pcatkins/.rbenv/versions/2.0.0-p0/bin/ruby
  - EXECUTABLE DIRECTORY: /home/pcatkins/.rbenv/versions/2.0.0-p0/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-linux
  - GEM PATHS:
     - /home/pcatkins/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0
     - /home/pcatkins/.gem/ruby/2.0.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

I installed jekyll using bundler.

And when I run,

ruby -e "require 'hitimes'" -e 'puts Hitimes.measure { sleep 0.1 }'

I get the following:

/home/pcatkins/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- hitimes/hitimes (LoadError)
    from /home/pcatkins/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /home/pcatkins/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/hitimes-1.2.2/lib/hitimes.rb:37:in `rescue in <top (required)>'
    from /home/pcatkins/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/hitimes-1.2.2/lib/hitimes.rb:32:in `<top (required)>'
    from /home/pcatkins/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `require'
    from /home/pcatkins/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
    from /home/pcatkins/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in `require'
    from -e:1:in `<main>'

Any suggestions @copiousfreetime?

@copiousfreetime
Owner

@pcatkins which linux distribution are you using? And can you drop the Gemfile you used to install jekyll in here?

@pcatkins

Thanks for the reply @copiousfreetime I am using Ubuntu 14.10 and my Gemfile has the following:

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

I have since resolved this issue by switching to ruby version 1.9.3-p194. Now everything is working fine with jekyll.

@joannahatter

I've run into the same issue, so my apologizes if this is redundant but nothing I've tried has worked. I'm running on Windows 8.
GemFile Contents

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

My original error when running: jekyll serve

C:\Users\jkayh_000\Documents\joannahatter.github.io>jekyll serve
Configuration file: C:/Users/jkayh_000/Documents/joannahatter.github.io/_config.yml
            Source: C:/Users/jkayh_000/Documents/joannahatter.github.io
       Destination: C:/Users/jkayh_000/Documents/joannahatter.github.io/_site
      Generating...
                    done.
C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- hitimes/hitimes (LoadError)
        from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/hitimes-1.2.2-x86-mingw32/lib/hitimes.rb:37:in `rescue in <top (required)>'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/hitimes-1.2.2-x86-mingw32/lib/hitimes.rb:32:in `<top (required)>'
        from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require'
        from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
        from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/timers-4.0.1/lib/timers/group.rb:4:in `<top (required)>'
        from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/timers-4.0.1/lib/timers.rb:4:in `<top (required)>'
        from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/receivers.rb:3:in `<top (required)>'
        from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid.rb:475:in `<top (required)>'
        from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/listen-2.10.0/lib/listen.rb:1:in `<top (required)>'
        from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jekyll-watch-1.2.1/lib/jekyll/watcher.rb:26:in `build_listener'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jekyll-watch-1.2.1/lib/jekyll/watcher.rb:7:in `watch'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:68:in `watch'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:38:in `process'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/commands/serve.rb:26:in `block (2 levels) in init_with_program'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/bin/jekyll:20:in `<top (required)>'
        from C:/Ruby22/bin/jekyll:23:in `load'
        from C:/Ruby22/bin/jekyll:23:in `<main>'

I too got an error when running:

ruby -e "require 'hitimes'" -e 'puts Hitimes.measure { sleep 0.1 }'

Which was

C:\Users\jkayh_000\Documents\joannahatter.github.io>ruby -e "require 'hitimes'" -e 'puts Hitimes.measure { sleep 0.1 }'
C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- hitimes/hitimes (LoadError)
        from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/hitimes-1.2.2-x86-mingw32/lib/hitimes.rb:37:in `rescue in <top (required)>'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/hitimes-1.2.2-x86-mingw32/lib/hitimes.rb:32:in `<top (required)>'
        from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require'
        from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
        from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require'
        from -e:1:in `<main>'

My Gem Environment:

RubyGems Environment:
  - RUBYGEMS VERSION: 2.4.5
  - RUBY VERSION: 2.2.2 (2015-04-13 patchlevel 95) [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/jkayh_000/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: C:/ProgramData
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mingw32
  - GEM PATHS:
     - C:/Ruby22/lib/ruby/gems/2.2.0
     - C:/Users/jkayh_000/.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:\Python27\
     - C:\Python27\Scripts
     - C:\Program Files (x86)\HP SimplePass\x64
     - C:\Program Files (x86)\HP SimplePass\
     -
     - C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
     - C:\Program Files (x86)\Intel\iCLS Client\
     - C:\Program Files\Intel\iCLS Client\
     - C:\WINDOWS\system32
     - C:\WINDOWS
     - C:\WINDOWS\System32\Wbem
     - C:\WINDOWS\System32\WindowsPowerShell\v1.0\
     - C:\Program Files (x86)\Windows Live\Shared
     - C:\Program Files\Intel\Intel(R) Management Engine Components\DAL
     - C:\Program Files\Intel\Intel(R) Management Engine Components\IPT
     - C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL
     - C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT
     - C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86
     - C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64
     - C:\Program Files\Microsoft\Web Platform Installer\
     - C:\Program Files\Microsoft SQL Server\110\Tools\Binn\
     - C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\
     - C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\
     - C:\Program Files\nodejs\
     - C:\Program Files (x86)\QuickTime\QTSystem\
     - C:\Python27
     - C:\Ruby22\bin
     - C:\Program Files\Java\jdk1.7.0_11\bin
     - C:\Users\jkayh_000\AppData\Roaming\npm\
     - C:\WINDOWS\system32
     - C:\mingw\bin

And Gems:

*** LOCAL GEMS ***

activesupport (4.2.1)
bigdecimal (1.2.6)
blankslate (2.1.2.4)
bundler (1.9.9)
celluloid (0.16.0)
classifier-reborn (2.0.3)
coffee-script (2.4.1)
coffee-script-source (1.9.1.1)
colorator (0.1)
execjs (2.5.2)
fast-stemmer (1.0.2)
ffi (1.9.8 x86-mingw32)
gemoji (2.1.0)
github-pages (35)
github-pages-health-check (0.3.1)
hitimes (1.2.2 x86-mingw32)
html-pipeline (1.9.0)
i18n (0.7.0)
io-console (0.4.3)
jekyll (2.5.3, 2.4.0)
jekyll-coffeescript (1.0.1)
jekyll-gist (1.2.1)
jekyll-mentions (0.2.1)
jekyll-paginate (1.1.0)
jekyll-redirect-from (0.6.2)
jekyll-sass-converter (1.2.0)
jekyll-sitemap (0.8.1)
jekyll-watch (1.2.1)
jemoji (0.4.0)
json (1.8.2, 1.8.1)
kramdown (1.5.0)
liquid (2.6.2)
listen (2.10.0)
maruku (0.7.0)
mercenary (0.3.5)
mini_portile (0.6.2)
minitest (5.6.1)
net-dns (0.8.0)
nokogiri (1.6.6.2 x86-mingw32)
parslet (1.5.0)
posix-spawn (0.3.11)
power_assert (0.2.2)
psych (2.0.8)
public_suffix (1.5.1)
pygments.rb (0.6.1)
rake (10.4.2)
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
rdiscount (2.1.7)
rdoc (4.2.0)
redcarpet (3.1.2)
RedCloth (4.2.9 x86-mingw32)
rouge (1.9.0)
safe_yaml (1.0.4)
sass (3.4.13)
terminal-table (1.4.5)
test-unit (3.0.8)
thread_safe (0.3.5)
timers (4.0.1)
toml (0.1.2)
tzinfo (1.2.2)
yajl-ruby (1.2.1)
@copiousfreetime
Owner

@joannahatter this is because I have not released a fatbinary gem for ruby 2.2 on windows. I'll be attempting to do that here before too long. See Issue #40.

@joannahatter

@copiousfreetime Thanks for getting back to me. I'll keep an eye out for your next release.

@AnanthaRajuC

I encountered the same problem in windows 7. As specified in issue #40 according to
http://stackoverflow.com/questions/28985481/hitimes-require-error-when-running-jekyll-serve-on-windows-8-1/28998745#28998745
the solution is to uninstall and reinstall it

gem uni hitimes

gem ins hitimes -v 1.2.1 --platform ruby

@alexkates

@AnanthaRajuC Thanks, the uni/ins hitimes worked for me.

@copiousfreetime
Owner

Just so people who find this issue via Google, This is all fixed in version 1.2.3. Please make sure you are using hitimes version 1.2.3 or greater.

@lcfg
lcfg commented Sep 14, 2015

Just a tip to people who might've encountered this error and are now reading this: the uninstalling and installing of hitimes 1.2.3 (uni/ins above) might not resolve your problem (it's a PATH issue I think). Just run bundle update (notice the Installing hitimes 1.2.3 (was 1.2.2) appearing on screen) and then try running jekyll again. This resolved the issue for me.

Thanks @copiousfreetime!

@gallaglaxmi

Hello,

I am using Ruby23-x64 in windows-7 for selenium webdriver. I am facing similar kind of issue for selenium.

C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- ffi_c (LoadError) from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/ffi-1.9.10-x64-mingw32/lib/ffi.rb:6:in rescue in <top (required)>' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/ffi-1.9.10-x64-mingw32/lib/ffi.rb:3:in<top (required)>'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/childprocess-0.5.9/lib/childprocess/windows.rb:1:in <top (required)>' from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/childprocess-0.5.9/lib/childprocess.rb:176:in<top (required)>'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/selenium-webdriver-2.48.0/lib/selenium/webdriver.rb:20:in <top (required)>' from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:inrequire'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in rescue in require' from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:inrequire'
from C:/Galla/workspace1/RubyTestSuite/Test.rb:2:in `

'

C:\Users\ADMIN>gem list

*** LOCAL GEMS ***

bigdecimal (1.2.8)
bundler (1.12.5)
childprocess (0.5.9)
did_you_mean (1.0.0)
ffi (1.9.10 x64-mingw32)
io-console (0.4.5)
json (1.8.3)
minitest (5.8.3)
multi_json (1.12.1)
net-telnet (0.1.1)
power_assert (0.2.6)
psych (2.0.17)
rake (10.4.2)
rdoc (4.2.1)
rubyzip (1.2.0)
selenium-webdriver (2.48.0)
test-unit (3.1.5)
websocket (1.2.3)

@copiousfreetime
Owner

@gallaglaxmi I would suggest you contact the selenium-webdriver folks and see if they can help out with your issue -- http://docs.seleniumhq.org/support/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment