安装jekyll遇到的坑 1
gem install jekyll
调用这个命令一直没有反应,后来网上找到的解决方案是替换 gem sources
http://www.tuicool.com/articles/7Vz6BzJ
gem sources --remove https://rubygems.org/
gem sources -a https://ruby.taobao.org/
gem sources -l #查看是否只有taobao镜像
gem update --system #更新RubyGems软件
gem install jekyll
安装jekyll遇到的坑 2
gem install jekyll
ERROR: While executing gem … (Errno::EPERM)
Operation not permitted - /usr/bin/kramdown
解决方案是 sudo gem install -n /usr/local/bin jekyll
高亮代码片段 1
1
2
3
4
5
6
7
def show
@widget = Widget(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @widget }
end
end
高亮代码片段 2
gem sources --remove https://rubygems.org/
gem sources -a https://ruby.taobao.org/
gem sources -l #查看是否只有taobao镜像
gem update --system #更新RubyGems软件
gem install jekyll