{"author_name":"iriya_0624","author_url":"https://blog.hatena.ne.jp/iriya_0624/","provider_url":"https://hatena.blog","title":"Ruby on Rails\u3067BULK INSERT","published":"2013-07-25 20:00:25","height":"190","url":"https://iriya-0624.hatenadiary.org/entry/20130725/1374750025","categories":["Ruby on Rails"],"blog_url":"https://iriya-0624.hatenadiary.org/","blog_title":"\u622f\u8a00\u30e1\u30a4\u30c6\u30eb","image_url":null,"provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Firiya-0624.hatenadiary.org%2Fentry%2F20130725%2F1374750025\" title=\"Ruby on Rails\u3067BULK INSERT - \u622f\u8a00\u30e1\u30a4\u30c6\u30eb\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"\u3084\u308a\u305f\u3044\u3053\u3068 Rails\u3067BULK INSERT\u3057\u305f\u3044\u3002 \u65b9\u6cd5 Gem\u300cactiverecord-import\u300d\u3092\u4f7f\u3046\u3002 activerecord-import\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002 $ vi Gemfile gem 'activerecord-import' $ sudo bundle install import\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u3066BULK INSERT reg_tweets = [] tweets.each do |tweet| # DB\u767b\u9332\u9805\u76ee user = tweet['user'] tweet_id = tweet['id_str'] name = user['name'] screen_n\u2026","version":"1.0","width":"100%","type":"rich"}