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

Jamie picture Jamie · May 18, 2012 · Viewed 9.4k times · Source

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

Answer

gavinheavyside picture gavinheavyside · Jun 20, 2012

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