ruby – hitimes在Windows 8.1上运行jekyll服务时需要输入错误
发布时间:2020-12-17 04:38:48 所属栏目:百科 来源:网络整理
导读:我正在尝试在运行 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 -- hit
我正在尝试在运行
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并且它工作正常,如果我打开irb我可以要求’hitimes’没有问题它只是似乎不适用于jekyll. 我的宝石环境是: 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:RubyDevKitbin - C:RubyDevKitmingwbin - C:windowssystem32 - C:windows - C:windowsSystem32Wbem - C:windowsSystem32WindowsPowerShellv1.0 - C:Program Filesnodejs - C:Usersadam.laycockAppDataRoamingnpm - C:Usersadam.laycockAppDataLocalGitHubPortableGit_c2ba306e536fdf878271f7fe636a147ff37326adcmd - C:Usersadam.laycockAppDataLocalGitHubPortableGit_c2ba306e536fdf878271f7fe636a147ff37326adbin - C:Usersadam.laycockAppDataLocalGitHubPortableGit_c2ba306e536fdf878271f7fe636a147ff37326admingwbin - C:Usersadam.laycockAppDataLocalApps2.0O3WGNDW8.VMMC2M3657K.JNRgith..tion_317444273a93ac29_0002.000a_7c768ac46c12be54 - C:windowsMicrosoft.NETFrameworkv4.0.30319 - C:Ruby22Bin 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 mentioned in the comments,需要RubyInstaller DevKit来编译二进制rubygems Hitimes的1.2.3及更高版本应包含Ruby 2.2.X版本的胖二进制文件. Thanks copiousfreetime (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |