Creating gist failed: 422 Unprocessable Entity #96

Closed
shevegen opened this Issue Apr 26, 2012 · 2 comments

Comments

Projects
None yet
3 participants

With the latest gist gem:

gist-3.1.0.gem

And older ruby version:

ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux]

I get an error when I try this:

require 'gist'
Gist.write( File.open("quiz.rb"))

Creating gist failed: 422 Unprocessable Entity

Then it exits.

As a user, I do not know what this error means or what to do now.

I can't gist upload this file, but if I do it via the browser manually, all works fine.

Could the message be more helpful so that a new user understands what to
do next in order to solve this problem? From the message I assume
that something may be invalid in quiz.rb

gorlum0 commented Apr 28, 2012

With the same ruby and gem version I get this error when trying to use path, not just file:
$ gist folder/file.py
Which was kind of surprising.

goodell commented May 5, 2012

Try pulling 963a5f6 from pull request #93 to fix the path issue. The API usage issue might be an authentication issue, since the GitHub API seems to spit 422 errors back when almost anything isn't quite right.

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