jekyll / jekyll-admin

A Jekyll plugin that provides users with a traditional CMS-style graphical interface to author content and administer Jekyll sites.
https://jekyll.github.io/jekyll-admin/
MIT License
2.82k stars 357 forks source link

Undefined method 'rewind' - pages cannot be added #709

Open igorfree opened 1 month ago

igorfree commented 1 month ago

Description:

When using jekyll-admin to add a page following error occurs:

2024-05-20 11:14:45 - NoMethodError - undefined method `rewind' for #<Rackup::Handler::WEBrick::Input:0x000062d68c626ab8 @request=#<WEBrick::HTTPRequest:0x000062d68c661190 ...

this seems related to rack/issue-1972. I tried updating everything with gem update, but no difference.

Tell us a bit about yourself:

Steps to reproduce:

create new jekyll page, with jekyll 4.3.3 add jekyll-admin plugin and try adding a new page via web GUI.

vcavallo commented 4 weeks ago

I set up jekyll-admin on one machine and everything worked fine (including page creation and editing). Cloned to another machine and ran it there - all the pages are there, but the jekyll-admin interface reports "could not fetch config" and can't update or create any posts.

here's a small snippet of the error output in the terminal:

/home/vcavallo/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rackup-2.1.0/lib/rackup/handler/webrick.rb:66 (created)>>:

                request.body.rewind
                            ^^^^^^^
        /home/vcavallo/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/jekyll-admin-0.11.1/lib/jekyll-admin/server.rb:84:in `request_body'
yuanworks commented 4 weeks ago

I managed to get it working by downgrading sinatra in the gemfile:

gem "sinatra", ">= 3", "< 4"