Closed leonardo-czanoch closed 2 years ago
Hi @leonardo-czanoch I'm sorry you are having trouble. I'm not very familiar with jekyll, and certainly not running it on Windows. I am hoping someone will come by to help you out 👍
@leonardo-czanoch try bundle add webrick
and retry bundle exec jekyll serve
Hey @leonardo-czanoch! Any updates? Was the issue resolved with https://github.com/expressjs/expressjs.com/issues/1292#issuecomment-974886102 or do you need any further help?
Hey @aravindvnair99 , sorry for the late response. It's too slow to view the document on official expressjs website. So I wanted to setup a local server hoping to check the documents more quickly.
I tried that solution https://github.com/expressjs/expressjs.com/issues/1292#issuecomment-974886102 several times, and unfortunately, it didn't work. Below is the error message.
C:\work\git>git --version
git version 2.34.0.windows.1
C:\work\git>git clone https://github.com/expressjs/expressjs.com.git
Cloning into 'expressjs.com'...
remote: Enumerating objects: 20675, done.
remote: Counting objects: 100% (525/525), done.
remote: Compressing objects: 100% (266/266), done.
remote: Total 20675 (delta 290), reused 440 (delta 242), pack-reused 20150
Receiving objects: 100% (20675/20675), 47.28 MiB | 3.92 MiB/s, done.
Resolving deltas: 100% (13377/13377), done.
Updating files: 100% (1113/1113), done.
C:\work\git>cd expressjs.com
C:\work\git\expressjs.com>gem install jekyll-redirect-from
Successfully installed jekyll-redirect-from-0.16.0
Parsing documentation for jekyll-redirect-from-0.16.0
Done installing documentation for jekyll-redirect-from after 1 seconds
1 gem installed
C:\work\git\expressjs.com>bundle install
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies.....
Using concurrent-ruby 1.1.9
Using i18n 0.9.5
Using json 1.8.6
Using minitest 5.14.4
Using thread_safe 0.3.6
Using tzinfo 1.2.9
Using activesupport 4.2.7
Using public_suffix 2.0.5
Using addressable 2.8.0
Using bundler 2.2.30
Using coffee-script-source 1.12.2
Using execjs 2.8.1
Using coffee-script 2.4.1
Using colorator 1.1.0
Using ffi 1.15.4 (x64-mingw32)
Using ethon 0.15.0
Using faraday-em_http 1.0.0
Using faraday-em_synchrony 1.0.0
Using faraday-excon 1.1.0
Using faraday-httpclient 1.0.1
Using faraday-net_http 1.0.1
Using faraday-net_http_persistent 1.2.0
Using faraday-patron 1.0.0
Using faraday-rack 1.0.0
Using multipart-post 2.1.1
Using ruby2_keywords 0.0.5
Using faraday 1.8.0
Using forwardable-extended 2.6.0
Using gemoji 2.1.0
Using net-dns 0.9.0
Using sawyer 0.8.2
Using octokit 4.21.0
Using typhoeus 0.8.0
Using github-pages-health-check 1.3.0
Using rb-fsevent 0.11.0
Using rb-inotify 0.10.1
Using sass-listen 4.0.0
Using sass 3.7.4
Using jekyll-sass-converter 1.3.0
Using listen 3.0.6
Using jekyll-watch 1.5.1
Using kramdown 1.11.1
Using liquid 3.0.6
Using mercenary 0.3.6
Using pathutil 0.16.2
Using rouge 1.11.1
Using safe_yaml 1.0.5
Using jekyll 3.3.1
Using jekyll-avatar 0.4.2
Using jekyll-coffeescript 1.0.1
Using jekyll-default-layout 0.1.4
Using jekyll-feed 0.8.0
Using jekyll-gist 1.4.0
Using jekyll-github-metadata 2.2.0
Using racc 1.6.0
Using nokogiri 1.12.5 (x64-mingw32)
Using html-pipeline 2.14.0
Using jekyll-mentions 1.2.0
Using jekyll-optional-front-matter 0.1.2
Using jekyll-paginate 1.1.0
Using jekyll-readme-index 0.0.3
Using jekyll-redirect-from 0.11.0
Using jekyll-relative-links 0.2.1
Using jekyll-seo-tag 2.1.0
Using jekyll-sitemap 0.12.0
Using jekyll-swiss 0.4.0
Using jekyll-theme-architect 0.0.3
Using jekyll-theme-cayman 0.0.3
Using jekyll-theme-dinky 0.0.3
Using jekyll-theme-hacker 0.0.3
Using jekyll-theme-leap-day 0.0.3
Using jekyll-theme-merlot 0.0.3
Using jekyll-theme-midnight 0.0.3
Using jekyll-theme-minimal 0.0.3
Using jekyll-theme-modernist 0.0.3
Using jekyll-theme-primer 0.1.5
Using jekyll-theme-slate 0.0.3
Using jekyll-theme-tactile 0.0.3
Using jekyll-theme-time-machine 0.0.3
Using jekyll-titles-from-headings 0.1.2
Using jemoji 0.7.0
Using minima 2.0.0
Using unicode-display_width 1.8.0
Using terminal-table 1.8.0
Using github-pages 110
Bundle complete! 1 Gemfile dependency, 85 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
C:\work\git\expressjs.com>bundle add webrick
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Using concurrent-ruby 1.1.9
Using i18n 0.9.5
Using json 1.8.6
Using minitest 5.14.4
Using thread_safe 0.3.6
Using tzinfo 1.2.9
Using activesupport 4.2.7
Using public_suffix 2.0.5
Using addressable 2.8.0
Using bundler 2.2.30
Using coffee-script-source 1.12.2
Using execjs 2.8.1
Using coffee-script 2.4.1
Using colorator 1.1.0
Using ffi 1.15.4 (x64-mingw32)
Using ethon 0.15.0
Using faraday-em_http 1.0.0
Using faraday-em_synchrony 1.0.0
Using faraday-excon 1.1.0
Using faraday-httpclient 1.0.1
Using faraday-net_http 1.0.1
Using faraday-net_http_persistent 1.2.0
Using faraday-patron 1.0.0
Using faraday-rack 1.0.0
Using multipart-post 2.1.1
Using ruby2_keywords 0.0.5
Using faraday 1.8.0
Using forwardable-extended 2.6.0
Using gemoji 2.1.0
Using net-dns 0.9.0
Using sawyer 0.8.2
Using octokit 4.21.0
Using typhoeus 0.8.0
Using github-pages-health-check 1.3.0
Using rb-fsevent 0.11.0
Using rb-inotify 0.10.1
Using sass-listen 4.0.0
Using sass 3.7.4
Using jekyll-sass-converter 1.3.0
Using listen 3.0.6
Using jekyll-watch 1.5.1
Using kramdown 1.11.1
Using liquid 3.0.6
Using mercenary 0.3.6
Using pathutil 0.16.2
Using rouge 1.11.1
Using safe_yaml 1.0.5
Using jekyll 3.3.1
Using jekyll-avatar 0.4.2
Using jekyll-coffeescript 1.0.1
Using jekyll-default-layout 0.1.4
Using jekyll-feed 0.8.0
Using jekyll-gist 1.4.0
Using jekyll-github-metadata 2.2.0
Using racc 1.6.0
Using nokogiri 1.12.5 (x64-mingw32)
Using html-pipeline 2.14.0
Using jekyll-mentions 1.2.0
Using jekyll-optional-front-matter 0.1.2
Using jekyll-paginate 1.1.0
Using jekyll-readme-index 0.0.3
Using jekyll-redirect-from 0.11.0
Using jekyll-relative-links 0.2.1
Using jekyll-seo-tag 2.1.0
Using jekyll-sitemap 0.12.0
Using jekyll-swiss 0.4.0
Using jekyll-theme-architect 0.0.3
Using jekyll-theme-cayman 0.0.3
Using jekyll-theme-dinky 0.0.3
Using jekyll-theme-hacker 0.0.3
Using jekyll-theme-leap-day 0.0.3
Using jekyll-theme-merlot 0.0.3
Using jekyll-theme-midnight 0.0.3
Using jekyll-theme-minimal 0.0.3
Using jekyll-theme-modernist 0.0.3
Using jekyll-theme-primer 0.1.5
Using jekyll-theme-slate 0.0.3
Using jekyll-theme-tactile 0.0.3
Using jekyll-theme-time-machine 0.0.3
Using jekyll-titles-from-headings 0.1.2
Using jemoji 0.7.0
Using minima 2.0.0
Using unicode-display_width 1.8.0
Using terminal-table 1.8.0
Using github-pages 110
Using webrick 1.7.0
C:\work\git\expressjs.com>bundle exec jekyll serve
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/kramdown-1.11.1/lib/kramdown/parser/html.rb:10:in `require': cannot load such file -- rexml/parsers/baseparser (LoadError)
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/kramdown-1.11.1/lib/kramdown/parser/html.rb:10:in `<top (required)>'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/kramdown-1.11.1/lib/kramdown/parser/kramdown/html.rb:10:in `require'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/kramdown-1.11.1/lib/kramdown/parser/kramdown/html.rb:10:in `<top (required)>'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/kramdown-1.11.1/lib/kramdown/parser/kramdown/paragraph.rb:14:in `require'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/kramdown-1.11.1/lib/kramdown/parser/kramdown/paragraph.rb:14:in `<top (required)>'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/kramdown-1.11.1/lib/kramdown/parser/kramdown.rb:336:in `require'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/kramdown-1.11.1/lib/kramdown/parser/kramdown.rb:336:in `<class:Kramdown>'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/kramdown-1.11.1/lib/kramdown/parser/kramdown.rb:60:in `<module:Parser>'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/kramdown-1.11.1/lib/kramdown/parser/kramdown.rb:19:in `<module:Kramdown>'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/kramdown-1.11.1/lib/kramdown/parser/kramdown.rb:17:in `<top (required)>'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-3.3.1/lib/jekyll/converters/smartypants.rb:1:in `require'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-3.3.1/lib/jekyll/converters/smartypants.rb:1:in `<top (required)>'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-3.3.1/lib/jekyll.rb:11:in `require'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-3.3.1/lib/jekyll.rb:11:in `block in require_all'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-3.3.1/lib/jekyll.rb:10:in `each'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-3.3.1/lib/jekyll.rb:10:in `require_all'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-3.3.1/lib/jekyll.rb:182:in `<top (required)>'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-3.3.1/exe/jekyll:6:in `require'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-3.3.1/exe/jekyll:6:in `<top (required)>'
from C:/Ruby30-x64/bin/jekyll:23:in `load'
from C:/Ruby30-x64/bin/jekyll:23:in `<main>'
I got the same issue too. I ran the commands from a PowerShell 7 terminal, but nothing changed
$ gem install github-pages
$ gem install jekyll
$ gem install jekyll-feed
$ bundle update
I got them from this post on StackOverflow
I hope this issue gets fixed soon.
Edit: I suspect it should be from jekyll
itself and not the repository
@aravindvnair99 , @dougwilson FYI. I finally found a solution!!!!! It requires some imagination for people like me who doesn't know ruby stack at all.
Especially thanks to @OyewoleOyedeji for the StackOverflow , I think it has something to do with the versions of ruby, gem, bundle and libraries. Anyway, the solution is as follows:
Delete everything in Gemfile then add one line: source 'https://rubygems.org'
.
Then run the following command to installl github-pages
, jekyll
, and webrick
bundle add github-pages
bundle add jekyll
bundle add webrick
Finally run the command to start the website: bundle exec jekyll serve -H 0.0.0.0
.
I originally wanted to run it in docker container, so I provide a Dockfile here for free.
FROM ruby:latest
WORKDIR /site
RUN git clone https://github.com/expressjs/expressjs.com.git
WORKDIR /site/expressjs.com
RUN echo "source 'https://rubygems.org'" > Gemfile && \
bundle add github-pages && \
bundle add jekyll && \
bundle add webrick
CMD ["bundle", "exec", "jekyll", "serve", "-H", "0.0.0.0"]
The versions of ruby, gem and bundle in the docker container are:
#) ruby -v
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]
#) gem -v
3.3.7
#) bundle -v
Bundler version 2.3.7
@leonardo-czanoch I'm glad you found the solution, have been waiting ages for a working one 😃
Glad to know @leonardo-czanoch and thanks for sharing the solution! I'm hence closing this GitHub issue.
@leonardo-czanoch Thanks a lot, your solution worked for me.
on Windows 10, I installed ruby and in windows 10's command line tool I use gem to install bundle and use bundle as described in the readme file. The following is the error:
Any ideas how to fix this?