![](/img/trans.png)
[英]Can't save when running “jekyll serve” on Windows 8.1, Notepad++
[英]hitimes require error when running jekyll serve on windows 8.1
我正在嘗試在運行Windows 8.1的本地計算機上運行jekyll,我已經安裝了Ruby並且正在運行但是每次運行jekyll serve
命令時我都會收到錯誤消息:
C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- hitimes/hitimes (LoadError)
我已經嘗試通過gem install hitimes
hitimes手動gem install hitimes
並且它工作正常,如果我打開irb
我可以require 'hitimes'
沒問題它只是似乎不適用於jekyll。
我的gem environment
是:
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
返回2.5.3
它可能與Ruby 2.2中的一些破壞ABI更改有關,而hitimes-1.2.2-x86-mingw32
不包含Ruby 2.2的胖二進制文件。
解決方法是卸載並重新安裝它,並在安裝時使用--platform ruby
。
這樣做:
gem uni hitimes
**Remove ALL versions**
gem ins hitimes -v 1.2.1 --platform ruby
這將重新編譯與Ruby 2.2兼容的hitimes
。
編輯 :作為評論中提到的copiousfreetime , RubyInstaller DevKit需要編譯二進制rubygems
hitimes
1.2.3
及更高版本應該包含Ruby 2.2.X
版本的胖二進制文件。 謝謝豐富的自由時間
更新(2015-09-13) Hitimes版本1.2.3發布,解決了這個問題。
這是有點預期的,因為hitimes v1.2.2於1月發布,而Windows的第一個Ruby 2.2版本是在1月前的3月6日發布的。我還沒有機會使用Ruby 2.2 fat二進制文件為Windows構建hitimes 。 我為hitimes打開了一個問題,發布了一個新的fatimes二進制文件,其中包括對Ruby 2.2的支持 - https://github.com/copiousfreetime/hitimes/issues/40
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.