Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
igorfree opened this issue May 20, 2024 · 4 comments · Fixed by #715
Closed

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

igorfree opened this issue May 20, 2024 · 4 comments · Fixed by #715

Comments

@igorfree
Copy link

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:

  • jekyll (4.3.3)
  • jekyll-admin (0.11.1)
  • OS: KDE Neon
  • Just in case, Node version is v20.13.1

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
Copy link

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
Copy link

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

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

@igorfree
Copy link
Author

igorfree commented Jul 4, 2024

sorry for taking so long to respond.

Downgrading sinatra as mentioned here did not resolve the issue completely.

I'm still seing the error "Could not fetch config" when going to [jekyll-site]/admin. My _config.yml is valid and contains a jekyll_admin section, jekyll_admin even displays it under the "configuration" tab.

When going to "posts" tab, I do not see my old posts. But it is possible now to create new posts, which show up normally inside the _site directory and in the jekyll_admin GUI.

Edit:
when I go to the "pages" tab, I can only see very few of the pages that exist on my site. Just on random jekyll_admin seems to ignore most of the pages and only shows 3 out of 18 files present in the directory.

@yuanworks
Copy link

The "Could not fetch config" error is showing up in another older jekyll installation which uses sinatra 3.1, so it might be an unrelated issue.

I can't confirm on the old/new posts showing as I only have a few.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants