コードは変更されていません。宝石は変更されていませんが、APIにはおそらく含まれています。更新による、それは今
# Downloading https://openstates.org/api/v1/legislators/?state=Ca
[
{
"last_name" => "Gatto",
"updated_at" => "2016-09-24 07:16:00",
"nimsp_candidate_id" => nil,
"full_name" => "Mike Gatto",
"id" => "CAL000123",
"first_name" => "Mike",
"middle_name" => "",
"district" => "43",
"chamber" => "lower",
"state" => "ca",
"votesmart_id" => "120220",
"party" => "Democratic",
"+capitol_office" => {
"phone" => "(916) 319-2043",
"street" => "P.O. Box 942849, Room 4140",
"zip" => "94249-0043",
"city" => "Sacramento"
},
"all_ids" => [
"CAL000123",
"CAL000246",
"CAL000246",
"CAL000367"
],
"leg_id" => "CAL000123",
"active" => true,
"transparencydata_id" => "76584a5322274b9b892642b7b6ae3db5",
"photo_url" => "http://assembly.ca.gov/sites/assembly.ca.gov/files/memberphotos/AD43.jpg",
"+district_offices" => [
{
"phone" => "(818) 240-6330",
"street" => "300 East Magnolia, Suite 504",
"zip" => "91502",
"city" => "Burbank"
}
],
"url" => "http://asmdc.org/members/a43",
"country" => "us",
"created_at" => "2012-01-31 19:25:09",
"level" => "state",
"+district" => "43",
"offices" => [
{
"fax" => nil,
"name" => "Capitol Office",
"phone" => "916-319-2043",
"address" => "P.O. Box 942849, Room 5136\nSacramento, CA 94249-0043",
"type" => "capitol",
"email" => nil
},
{
"fax" => nil,
"name" => "District Office",
"phone" => "818-558-3043",
"address" => "300 East Magnolia Blvd, Suite 504\nBurbank, CA 91502",
"type" => "district",
"email" => nil
}
],
"+party" => "Democratic",
"suffixes" => ""
},
{
"last_name" => "Gordon",
"updated_at" => "2016-09-24 07:16:01",
...
を作業していた場合は、この5月に発生していないされています
それは出力:
は、ここでは、
OpenStates::Legislator.where(parameters)
から配列を得るのを助けるために非常に基本的なモジュールですあなたはあなたの宝石に行って、最新のバージョンにエラーがありました。あなたのgemfileにバグがなく、動作するはずのこの宝石のバージョンを指定してください。 – amrdruidこれは私が今まで使ってきた宝石と同じバージョンです。バージョン0.0.1 – user2974739
タグ 'Rubygems'を' gem'と 'openstates'または' OpenStates'に置き換えることをお勧めします。 –