14

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

TylerH
  • 20,799
  • 66
  • 75
  • 101
Jamie
  • 3,094
  • 1
  • 18
  • 28

1 Answers1

29

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

Nathan
  • 1,762
  • 1
  • 20
  • 30
gavinheavyside
  • 306
  • 3
  • 4
  • 1
    wasn't working for me until I realized I had skipped the *'require it in the file that creates the Faraday object'* part. – Pablo Marambio Jan 03 '14 at 12:29