外のアプリケーションからRailsのアプリケーションに対して、net/httpを使ってPOSTを叩いても、Rails側の処理で TypeError (no implicit conversion of Symbol into Integer) が出ていたときに解決したときのメモ。 な、何を言っているかと思うが…(ry ここのurls内の配列がStringで認識されていたので聞いてみた。 JSON.parseを行う位置が間違っていた。 data.to_jsonしてしまっていて、肝心の取り出したい中身の方をjsonにしていなかった。 dataの中の方がStringになっていたのが問題。 JSON形式で渡したい部分のデータを.to_jsonしてから送る。 受け取り側(今回だとRailsのコントローラ側)では、JSON.parseしてからデータを処理する。 もっとラクに送りたい。 受け取り側でJS