If I create a new instance of MassBuilds on my local machine, I am unable to create a new development. I receive the following error:
Started POST "/developments" for 127.0.0.1 at 2016-12-22 13:45:08 -0500
Processing by API::V1::DevelopmentsController#create as application/vnd.api+json; application/org.massbuilds.v1
Parameters: {"data"=>{"attributes"=>{"name"=>"Eye of Sauron", "tagline"=>"Trump Tower", "description"=>"A description by Matt about this thing.", "status"=>"completed", "year-compl"=>2010, "redevelopment"=>false, "asofright"=>false, "age-restricted"=>false, "clusteros"=>false, "phased"=>false, "cancelled"=>false, "private"=>false, "onsitepark"=>2, "address"=>"60 Templ", "latitude"=>42.3550591, "longitude"=>-71.06131479999999, "street-view-latitude"=>42.35501263839569, "street-view-longitude"=>-71.06164608346103, "street-view-heading"=>30, "street-view-pitch"=>5, "tothu"=>0, "prjarea"=>nil, "stories"=>nil, "height"=>nil, "singfamhu"=>0, "twnhsmmult"=>0, "lgmultifam"=>0, "affordable"=>0, "gqpop"=>0, "fa-ret"=>1000, "fa-ofcmd"=>0, "fa-indmf"=>0, "fa-whs"=>0, "fa-rnd"=>0, "fa-other"=>0, "fa-edinst"=>0, "commsf"=>1000, "fa-hotel"=>0, "hotelrms"=>0, "rptdemp"=>0, "emploss"=>0}, "type"=>"developments"}}
APIKey Load (0.9ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token" IS NULL LIMIT 1
APIKey Load (0.6ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token" = $1 LIMIT 1 [["token", "679c53a75e9ff1ef6d2ceb7aba569ebe"]]
User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 12]]
(0.4ms) BEGIN
CACHE (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 12]]
(3.1ms) SELECT COUNT(*) FROM "places" WHERE (ST_Intersects(geom, 'POINT (-71.0613148 42.3550591)'))
Place Load (3.4ms) SELECT "places".* FROM "places" WHERE (ST_Intersects(geom, 'POINT (-71.0613148 42.3550591)')) ORDER BY
CASE
WHEN type = 'Neighborhood' THEN '1'
WHEN type = 'Municipality' THEN '2'
ELSE '3'
END
LIMIT 1
Internal Server Error: undefined method `detect' for nil:NilClass /Users/mzagaja/GitHub/massbuilds/lib/nearest_transit.rb:23:in `subway_station'
/Users/mzagaja/GitHub/massbuilds/lib/nearest_transit.rb:17:in `stop_name'
/Users/mzagaja/GitHub/massbuilds/lib/nearest_transit.rb:11:in `get'
/Users/mzagaja/GitHub/massbuilds/app/models/concerns/development/model_callbacks.rb:59:in `update_nearest_transit
It appears that the app is attempting to do something by calling an external service or internal service that it cannot reach. My current theory is that this may be Mapzen and that the path forward is to document the setup of Mapzen for development users in README.md. Users will likely need to create a .env file with their Mapzen API key set.
If I create a new instance of MassBuilds on my local machine, I am unable to create a new development. I receive the following error:
It appears that the app is attempting to do something by calling an external service or internal service that it cannot reach. My current theory is that this may be Mapzen and that the path forward is to document the setup of Mapzen for development users in README.md. Users will likely need to create a .env file with their Mapzen API key set.