Closed elizabethwarden closed 3 years ago
@elizabethwarden
This is not an issue with this repo (rubyinstaller2). It's messy, you might look at an old issue that I started in my Jekyll fork: https://github.com/MSP-Greg/jekyll/issues/1.
Please consider closing this and looking elsewhere for answers. One thing, I think all commands should be done from a Windows cmd or PowerShell window...
Thank you for the prompt response. I'll keep digging. Thank you
@elizabethwarden Hello, I'm one of Jekyll's maintainers. I'm posting some notes here to help other users facing similar issue.
First of all, from the opening post, it isn't clear as to which version of Ruby you have installed. I'm assuming it is Ruby 3.0.
If so, the error is most probably because webrick
is no longer part of Ruby's library. You'll have to include gem 'webrick'
as well in your Gemfile.
Secondly, you need not run bundle init
and modify the Gemfile manually. Simply running jekyll new <PATH>
, where <PATH>
denotes the empty directory you wish to initialize as a Jekyll Workspace, will do. Just add the webrick
gem manually to Gemfile in a subsequent step but prior to running bundle exec jekyll serve
.
More info at https://jekyllrb.com/docs/
Lastly, the opening post above says ridk version
couldn't be completed successfully.
Therefore, did you run ridk install
at the end of the Ruby installation process?
Also, did bundle install
run successfully? MSYS2 and other programs from the DevKit is required to install native dependencies while installing Jekyll.
@MSP-Greg Ruby version: ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x64-mingw32]
@elizabethwarden Sorry I can't reproduce the issue with the information you provided!
cmd
or powershell
? Bash isn't fully supported by RubyInstaller.@ashmaroli I am not running Ruby 3.0. Should I? I'm on ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x64-mingw32]
@larskanis
Jekyll 4.2.0 Please append `--trace` to the `serve` command
for any additional information or backtrace.
load': marshal data too short (ArgumentError) from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/cache.rb:171:in
load'
from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/cache.rb:86:in []' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/cache.rb:41:in
clear_if_config_changed'
from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:118:in reset' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:35:in
initialize'
from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:30:in new' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:30:in
process'
from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in block in process_with_graceful_fail' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in
each'
from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in process_with_graceful_fail' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in
block (2 levels) in init_with_program'
from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in block in execute' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in
each'
from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in execute' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in
go'
from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in program' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/exe/jekyll:15:in
<top (required)>'
from C:/Ruby27-x64/bin/jekyll:23:in load' from C:/Ruby27-x64/bin/jekyll:23:in
Thank you all for your help. At one point, I was able to build the Jekyll site locally, no problem. Then all of a sudden a few months ago - not sure what happened - but I was no longer able to build. I keep getting the same error that something is wrong with the _config.yml file and then all this stuff about Ruby in the log.
@elizabethwarden No, you need not use Ruby 3.0 to run Jekyll. Ruby 2.7 is sufficient. From the stack trace, it is evident that the issue is not because of the RubyInstaller project.
The issue seems to be arising from your site's cache. You can try the following:
.jekyll-cache
directory. Perhaps it wasn't created properly or contains corrupted data.--disable-disk-cache
option. i.e. run: bundle exec jekyll serve --disable-disk-cache
disable_disk_cache: true
in your config file.Since this isn't a RubyInstaller2 issue, you may close this ticket if possible. If the issue still persists after trying the above suggestions, I welcome you to open a ticket at https://github.com/jekyll/jekyll directly.
@ashmaroli Thank you for your help. I have tried all the solutions in this ticket and I'm still having the same error. I will fiddle around with this a bit more and will open a ticket with Jekyll directly. I appreciate all of your help!
@elizabethwarden No, you need not use Ruby 3.0 to run Jekyll. Ruby 2.7 is sufficient. From the stack trace, it is evident that the issue is not because of the RubyInstaller project.
The issue seems to be arising from your site's cache. You can try the following:
- Delete the
.jekyll-cache
directory. Perhaps it wasn't created properly or contains corrupted data.Bypass disk-caching entirely via either of the following:
- by using the
--disable-disk-cache
option. i.e. run:bundle exec jekyll serve --disable-disk-cache
- by having
disable_disk_cache: true
in your config file.Since this isn't a RubyInstaller2 issue, you may close this ticket if possible. If the issue still persists after trying the above suggestions, I welcome you to open a ticket at https://github.com/jekyll/jekyll directly.
Big thanks
What problems are you experiencing?
I have followed the steps to download Ruby, Ruby Dev Kit, Bundler and Jekyll as listed here: https://rubyinstaller.org/downloads/. I am trying to run my Jekyll site locally, but keep running into the same error message after I enter the commands
bundle update
andbundle exec jekyll serve
:Configuration file: C:/[FILEPATH]/doc-standards-processes/_config.yml
Steps to reproduce
1.Download Ruby, Ruby Dev Kit, Bundler and Jekyll as listed here: https://rubyinstaller.org/downloads/
What's the output from
ridk version
?bash: ridk: command not found