一分一秒真剣勝負!

Ruby, Railsなど。Web系の技術ネタを充実させたい・・が、そうなるかは分からない。

2012-09-01から1ヶ月間の記事一覧

ActiveResourceでバリデーションのエラーメッセージを送信する方法

よく見るサンプルコードみたく以下のように書くとダメ。 if @hoge.save format.json { render :json => @hoge, :status => :ok } else format.json { render :json => @hoge.errors, :status => :unprocessable_entity } end エラーを返す時はハッシュで:err…

fatal: Could not parse object <Capistrano>

Gitサーバの参照先を変えたらCapistranoでエラー。 ** [server_name :: out] Warning: Permanently added 'ip address' (RSA) to the list of known hosts. 実行ログを見ると旧サーバのIPを参照しているようだ。 色々とググったら以下のサイトを見て解決。 h…