There is always an error when building ruby scripts in Sublime from “Menu -> Tools -> Build”

The reason is Sublime sticks to the standard $PATH defined by Mac system deafult, while shell is using its own $PATH.

To be specific, zsh refers to ~/.zshrc, and sublime refers to /etc/zshenv which refers to /etc/paths

You can build the ruby scripts in sublime and run them in shell to see the difference

puts `which ruby`
puts `which gem`
puts `echo $PATH`

My sublime prints the system default ruby2.0 linked from /usr/bin while my zsh prints the brew installed ruby2.1 linked from /usr/local/bin. And it goes the same for gem.

The solution is quite simple: to edit /etc/paths until the paths and order are what you need.

【译】APP索引&SEO的下一个战场:苹果搜索 + iOS APP索引

译者定义:1. 应用页面 的原文叫“app screen”,相当于一个网页,比如你在看知乎APP中的一篇帖子,那么这个帖子就是一个“应用页面”。2. TDK的意思是“标题 描述 关键词”============================================...… Continue reading