Web + Life Hack

〜True But Useless〜

【rails】【Gem】決定版!rubygemsはこいつで決まり!

capstano使ってデプロイをした時にこけまくりました。
その時、同僚に助けてもらったので次回から自力で解決出来るように、
備忘録としてメモを残しておきたいと思います。

エラー時の内容

** [out :: g08m11.hateblo.jp/] Git error: command `git fetch --force --quiet --tags
** [out :: g08m11.hateblo.jp/] 'git://github.com/rspec/rspec-core.git' "refs/heads/*:refs/heads/*"` in 
** [out :: g08m11.hateblo.jp/] directory 
** [out :: g08m11.hateblo.jp/] /home/g08m11/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/cache/bundler/git/rspec-core-2398fcadf5beb256bed9c548c59445d3b4c8a047
** [out :: g08m11.hateblo.jp/] has failed. 
** [out :: g08m11.hateblo.jp/] If this error persists you could try removing the cache directory ** [out :: g08m11.hateblo.jp/] '/home/g08m11/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/cache/bundler/git/rspec-core-2398fcadf5beb256bed9c548c59445d3b4c8a047' command finished in 68377ms*** [whenever:update_crontab] rolling back

今までこのエラーが出たときは

source 'http://rubygems.org'

もしくは

source 'https://rubygems.org'

など交互に切り替えデプロイ出来るやつを選んでいたのですが、
今回はどちらにもアクセスが集中していたみたいで

source 'http://production.cf.rubygems.org' 

で対応しました。

こちらはrubygemsミラーサイトの様で、
こちらに変更するとスムーズにデプロイ出来ました。

やはりもつべきものは経験ある同僚ですね。
次こそは自分が。。。


個人的な写真:
そろそろクリスマス!
http://instagram.com/p/TQmIyvwYtz/
Instagram