2017-09-01 178 views
1

我跟隨https://jekyllrb.com/docs/installation/來安裝Jekyll,我確定我已經安裝了Xcode command line tools, gcc and make。紅寶石的版本是2.1.1我一直在使用`require':無法加載這樣的文件 - 打包程序(LoadError)

gem install jekyll 

安裝傑奇我得到了以下成功消息

Done installing documentation for safe_yaml, rouge, forwardable-extended, pathutil, mercenary, liquid, kramdown, ffi, rb-inotify, rb-fsevent, listen, jekyll-watch, sass-listen, sass, jekyll-sass-converter, colorator, public_suffix, addressable, jekyll after 14 seconds 
     19 gems installed 

但是,當我執行jekyll --version

我得到了以下錯誤

/Users/amar/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- bundler (LoadError) 
    from /Users/amar/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require' 
    from /Users/amar/.rvm/gems/ruby-2.1.0/gems/jekyll-3.5.2/lib/jekyll/plugin_manager.rb:46:in `require_from_bundler' 
    from /Users/amar/.rvm/gems/ruby-2.1.0/gems/jekyll-3.5.2/exe/jekyll:9:in `<top (required)>' 
    from /Users/amar/.rvm/gems/ruby-2.1.0/bin/jekyll:23:in `load' 
    from /Users/amar/.rvm/gems/ruby-2.1.0/bin/jekyll:23:in `<main>' 
    from /Users/amar/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval' 
    from /Users/amar/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main> 

回答

4

錯誤是通過再次安裝捆綁器的新版本解決的,我已經安裝了它以前很好,但有版本問題

gem install bundler 

通過

bundler --version 

檢查捆綁的版本。如果一切順利,它會顯示版本號 然後再次運行jekyll --version,一切都應該去罰款

相關問題