use https://rubygems.org/ instead of http://rubygems.org/ in Gemfile
Modified so directions api can use Lat & Lng values from the model.

i.e:

gmaps({ "direction" => { "data" => { "from" => @points.first.to_gmaps4rails,
                                      "to" => @points.last.to_gmaps4rails },
                         "options" => {
                           "waypoints" => get_waypoints(@points),
                           "use_latlng" => true
                         }
      }})