Giter VIP home page Giter VIP logo

onemoretime1357.github.io's Introduction

onemoretime1357.github.io's People

Contributors

dependabot[bot] avatar onemoretime1357 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

savokiss

onemoretime1357.github.io's Issues

如何安装jekyll

环境

  • macOS Mojave 10.14.x

直接进行安装会出现如下的问题

~ gem install bundler
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.

如何解决呢?
如果认为是权限的问题,即使加上sudo也是不行的。

导致这个问题的原因,我猜想是在系统层级的ruby进行安装,mac不允许修改系统的ruby。

官网给出的解决办法是重新安装ruby,
使用homebrew重新进行安装,然后修改路径,优先访问brew中的ruby

brew install ruby

# 安装完成执行如下
echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile

# 如果使用的是zsh终端,需要也在zsh中添加环境路径
echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.zshrc

# 重启终端,执行,which ruby
which ruby
# /usr/local/opt/ruby/bin/ruby
# 此时ruby的路径变成了我们使用brew安装的路径

ruby -v
# ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin18]
# 此时输出的也是我们刚安装的ruby版本

上面代码执行完,然后再安装bundler和jekyll
由于我是10.14的系统,执行如下代码

sudo gem install bundler
sudo gem install -n /usr/local/bin/ jekyll

官方教程文档macos install jekyll

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.