edwardsamuel / google-maps-services-ruby

Ruby gem for Google Maps Web Service APIs
Apache License 2.0
91 stars 52 forks source link

ArgumentError: tried to create Proc object without a block #16

Open mike927 opened 3 years ago

mike927 commented 3 years ago

Hello, upgraded my app to Ruby 3.0.1 and it looks like hurley-0.2 which is a dependency of your product broke the gem. Getting that error while calling DirectionsApi

2021-04-28T17:21:35.996Z pid=98696 tid=2ifg WARN: ArgumentError: tried to create Proc object without a block
2021-04-28T17:21:35.996Z pid=98696 tid=2ifg WARN: /Users/michal/.rvm/gems/ruby-3.0.1/gems/hurley-0.2/lib/hurley.rb:45:in `new'

Is it a chance somebody could fix it?

mybuddyandrew commented 3 years ago

I'm getting the same error

AkermanisM commented 3 years ago

I forked the hurley lib and potentialy fixed the place giving the error. Not sure if it's the correct way, but the google service works again in my project - https://github.com/AkermanisM/hurley

Minimally tested, but maybe it helps somebody.

Miloshes commented 2 years ago

Great job @AkermanisM, your fork of hurley worked in my project as well.

aames-cls commented 2 years ago

I forked the hurley lib and potentialy fixed the place giving the error. Not sure if it's the correct way, but the google service works again in my project - https://github.com/AkermanisM/hurley

Minimally tested, but maybe it helps somebody.

I'm sorry. I'm a little slow. how did you fork/fix it? I'm having. this same issue and it's driving me nuts

AkermanisM commented 2 years ago

There is button in github interface called Fork, it will create a repository with identical code as the source repo.\

This is the commit where i fixed it https://github.com/AkermanisM/hurley/commit/2f8924c89b0269a71c30e537789c045eedb8fd7d

aames-cls commented 2 years ago

I added

gem 'hurley', :git => "https://github.com/AkermanisM/hurley.git"

to my Gemfile and now everything works like a charm! thanks you're the best :)