Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Uninitialized constant Faraday::Request::JSON #135

Closed
llimllib opened this Issue Sep 21, 2012 · 5 comments

Comments

Projects
None yet
4 participants

Immediately after adding it to my gemfile and bundle installing:

$ irb   
>> require 'octokit'                                                                                               
Faraday: you may want to install system_timer for reliable timeouts                                                
=> true
>> Octokit.user("sferik")
NameError: uninitialized constant Faraday::Request::JSON                                                           
        from /Library/Ruby/Gems/1.8/gems/octokit-1.0.2/lib/octokit/connection.rb:27:in `connection'                
        from /Library/Ruby/Gems/1.8/gems/faraday-0.8.4/lib/faraday/connection.rb:48:in `initialize'                
        from /Library/Ruby/Gems/1.8/gems/faraday-0.8.4/lib/faraday.rb:11:in `new'                                  
        from /Library/Ruby/Gems/1.8/gems/faraday-0.8.4/lib/faraday.rb:11:in `new'                                  
        from /Library/Ruby/Gems/1.8/gems/octokit-1.0.2/lib/octokit/connection.rb:25:in `connection'                
        from /Library/Ruby/Gems/1.8/gems/octokit-1.0.2/lib/octokit/request.rb:28:in `request'                      
        from /Library/Ruby/Gems/1.8/gems/octokit-1.0.2/lib/octokit/request.rb:10:in `get'                          
        from /Library/Ruby/Gems/1.8/gems/octokit-1.0.2/lib/octokit/client/users.rb:23:in `user'                    
        from /Library/Ruby/Gems/1.8/gems/octokit-1.0.2/lib/octokit.rb:18:in `send'                                 
        from /Library/Ruby/Gems/1.8/gems/octokit-1.0.2/lib/octokit.rb:18:in `method_missing'                       
        from (irb):2
Member

catsby commented Sep 21, 2012

I can't reproduce this locally. What version of Ruby / Octokit?

~ ❯ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.0.0]
~ ❯ irb                                                                                                                                                                         
irb(main):001:0> require 'octokit'
=> true
irb(main):005:0> Octokit::VERSION
=> "1.13.0"
irb(main):002:0> Octokit.user('ctshryock')
=> #<Hashie::Mash avatar_url="https://secure.gravatar.com/avatar/...

Member

joeyw commented Sep 25, 2012

From the debug spew you can see octokit 1.0.2 is being used, you need to update your gem file and run bundle update.

Owner

pengwynn commented Sep 25, 2012

Closing. Please reopen if upgrading doesn't fix the issue.

@pengwynn pengwynn closed this Sep 25, 2012

Works fine with ruby 1.9.3, doesn't work at all with ruby 1.8.7, you may want to add a hard requirement for a more recent ruby.

in meta: very sorry for leaving this unresponded to for so long, got dragged in other directions for a while.

Owner

pengwynn commented Oct 12, 2012

No worries. We're still working on the best dependency fix over on pengwynn/faraday_middleware#50. For now, I've updated the README to include a note to add the json gem to your Gemfile if not on 1.9.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment