Skip to content

Faraday ClientError issue due to version mismatch #665

Closed

Description

@robdasilva

Before submitting an issue, please be sure to

This issue affects

  • The site generated by GitHub Pages
  • Building sites locally

The GitHub Pages Gem is intended to help users replicate the GitHub Pages build environment locally. If your issue affects both the hosted version and the version previewed locally, you may be better suited reporting seeking support in other forums.

What did you do (e.g., steps to reproduce)

Create a new repo locally, create a Gemfile with gem "github-pages", group: :jekyll_plugins, run bundle install and finally run bundle exec Jekyll serve.

What did you expect to happen?

The site to be built and served on localhost:4000.

What happened instead?

A build error was shown:

jekyll 3.8.5 | Error:  uninitialized constant Faraday::Error::ClientError
Did you mean?  Faraday::ClientError

Additional information

As far as I was able to narrow the issue down, it has something to do with faraday (1.0.0) being installed by the above listed steps. After manually lowering the version to 0.17.3 (the last release before 1.0.0) in Gemfile.lock and re-running bundle install, everything worked fine.

Activity

  1. parkr commented on Jan 1, 2020

    @parkr
    Contributor

    Would you please re-run with jekyll build — trace so we can see which library is attempting to use this error?

    If not, I can attempt to reproduce in a week or two.

  2. robdasilva commented on Jan 1, 2020

    @robdasilva
    Author

    @parkr Sure thing:

    Configuration file: ~/blog/_config.yml
    bundler: failed to load command: jekyll (~/blog/vendor/bundle/ruby/2.6.0/bin/jekyll)
    NameError: uninitialized constant Faraday::Error::ClientError
    Did you mean?  Faraday::ClientError
      ~/blog/vendor/bundle/ruby/2.6.0/gems/octokit-4.14.0/lib/octokit/middleware/follow_redirects.rb:14:in `<module:Middleware>'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/octokit-4.14.0/lib/octokit/middleware/follow_redirects.rb:11:in `<module:Octokit>'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/octokit-4.14.0/lib/octokit/middleware/follow_redirects.rb:9:in `<top (required)>'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/octokit-4.14.0/lib/octokit/default.rb:1:in `require'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/octokit-4.14.0/lib/octokit/default.rb:1:in `<top (required)>'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/octokit-4.14.0/lib/octokit.rb:4:in `require'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/octokit-4.14.0/lib/octokit.rb:4:in `<top (required)>'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-github-metadata-2.12.1/lib/jekyll-github-metadata.rb:4:in `require'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-github-metadata-2.12.1/lib/jekyll-github-metadata.rb:4:in `<top (required)>'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-3.8.5/lib/jekyll/external.rb:58:in `require'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-3.8.5/lib/jekyll/external.rb:58:in `block in require_with_graceful_fail'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-3.8.5/lib/jekyll/external.rb:55:in `each'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-3.8.5/lib/jekyll/external.rb:55:in `require_with_graceful_fail'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-3.8.5/lib/jekyll/plugin_manager.rb:42:in `block in require_theme_deps'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-3.8.5/lib/jekyll/plugin_manager.rb:40:in `each'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-3.8.5/lib/jekyll/plugin_manager.rb:40:in `require_theme_deps'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-3.8.5/lib/jekyll/plugin_manager.rb:20:in `conscientious_require'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-3.8.5/lib/jekyll/site.rb:114:in `setup'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-3.8.5/lib/jekyll/site.rb:32:in `initialize'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:30:in `new'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:30:in `process'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
      ~/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-3.8.5/exe/jekyll:15:in `<top (required)>'
      ~/blog/vendor/bundle/ruby/2.6.0/bin/jekyll:23:in `load'
      ~/blog/vendor/bundle/ruby/2.6.0/bin/jekyll:23:in `<top (required)>'
    
  3. parkr commented on Jan 1, 2020

    @parkr
    Contributor

    Ah, octokit! Looks like a fix was merged: octokit/octokit.rb#1154

  4. robdasilva commented on Jan 1, 2020

    @robdasilva
    Author

    @parkr Yes. Unfortunately, there has not been a release of octokit since...

  5. Atem18 commented on Jan 1, 2020

    @Atem18

    Hi same error here :/

  6. ny-a commented on Jan 2, 2020

    @ny-a

    I had same error, and my workaronds are:

    • add gem "faraday", "~> 0.17" into Gemfile in your project
    • add gem "octokit", github: "octokit/octokit.rb", ref: "ae5838a" (or later such as branch: "master") into Gemfile in your project

    I think this problem is not this project's issue.

    and octokit is going to be released next week. octokit/octokit.rb#1177

  7. plata commented on Jan 3, 2020

    @plata

    I think this problem is not this project's issue.

    I cannot agree. When using the github-pages gem, you can expect that it works. If its dependencies are not reliable, it should pin them to a specific version and only update them if it's proven that they do not break anything.

  8. bvhme commented on Jan 10, 2020

    @bvhme

    I've given this some thought over this week and my 2ct, as a group that uses GitHub pages a lot, we use this Gem to get the same local result as what happens when we push to GitHub pages. This means that we expect this Gem to simulate that environment as much as possible. This means it would make sense this Gem would pin as many versions as it can to what the actual GitHub Pages stack is currently running.

    Sadly that is not a contribution I can make I think as I don't have access to that information. I suspect only GitHub insiders do.

  9. added a commit that references this issue on Jan 13, 2020
  10. added a commit that references this issue on Jan 28, 2020
  11. bvhme commented on Feb 2, 2020

    @bvhme

    If my last message was out of place or in bad form I'd like to extend my apology.

    I'd like some pointers to go figure out how we can push this forward but have a hard time figuring out where to start. Any tips?

    Thanks :)

  12. robdasilva commented on Feb 2, 2020

    @robdasilva
    Author

    As was pointed out by @parkr the issue has been fixed in octokit/octokit.rb#1154 and was part of a recent release, see octokit/octokit.rb#1177 as @ny-a pointed out.

    I think that pretty much solves it for now, so I'm going to close this issue.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions