Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RuntimeError: :json is not registered on Faraday::Request

I am fairly new to ruby and I am trying to execute a spec and I receive this error:

RuntimeError: :json is not registered on Faraday::Request

I am trying to use this gem: https://github.com/Chicago/windy

Mac OS X 10.7.4 Ruby 1.9.3, using RVM

Thanks

like image 655
Jamie Avatar asked May 18 '12 14:05

Jamie


1 Answers

I've just run into this when upgrading Faraday. The json request middleware was removed from Faraday in 0.8. It is now in the faraday_middleware gem. You should gem install faraday_middleware and require it in the file that creates the Faraday object.

See https://github.com/lostisland/faraday_middleware/wiki/Changes-0.8

like image 87
gavinheavyside Avatar answered Sep 21 '22 02:09

gavinheavyside



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!