2017年1月16日星期一

如何不使用用户名和密码进行git的push pull操作(Stack Overflow转载)

If you have configured SSH key to your Github account and are still getting the password prompt, make sure your repo URL is in the form
git@github.com:username/reponame.git
as opposed to
https://github.com/username/reponame.git
To see your repo URL, run:
git remote show origin
You can change the URL with:
git remote set-url origin git@github.com:username/reponame.git

如何解决Bundle时遇到json和notogiri无法正确安装的问题

一般造成这种问题的原因是工作环境没有提前安装好json和notogiri的依赖包。
对于错误提示
ERROR:  Error installing json:
ERROR: Failed to build gem native extension.
输入命令
sudo apt-get install libgmp3-dev ruby-dev
之后再次运行bundle install可解决

对于错误提示
ERROR:  Error installing nokogiri:
ERROR: Failed to build gem native extension.
输入命令
sudo apt-get install build-essential patch
sudo apt-get install ruby-dev zlib1g-dev liblzma-dev
sudo gem install nokogiri 和或 sudo gem install nokogiri -v '1.6.8.1'
之后再次运行bundle install可解决