after installing Jekyll and bundler and updating gemfile I get the error jekyll 3.8.7 | Error: wrong number of arguments (given 2, expected 1)
$ jekyll s
Configuration file: /Users/Yuriy/Documents/Blog/_config.yml
Source: /Users/Yuriy/Documents/Blog
Destination: /Users/Yuriy/Documents/Blog/_site
Incremental build: disabled. Enable with --incremental
Generating...
jekyll 3.8.7 | Error: wrong number of arguments (given 2, expected 1)
/usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/csv.rb:1656:in `read': **wrong number of arguments (given 2, expected 1) (** **ArgumentError** **)**
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/readers/data_reader.rb:57:in `read_data_file'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/readers/data_reader.rb:46:in `block in read_data_to'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/readers/data_reader.rb:38:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/readers/data_reader.rb:38:in `read_data_to'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/readers/data_reader.rb:20:in `read'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/reader.rb:18:in `read'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/site.rb:164:in `read'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/site.rb:69:in `process'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/command.rb:28:in `process_site'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/commands/build.rb:65:in `build'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/commands/build.rb:36:in `process'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/commands/serve.rb:93:in `block in start'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/commands/serve.rb:93:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/commands/serve.rb:93:in `start'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/commands/serve.rb:75:in `block (2 levels) in init_with_program'
from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/exe/jekyll:15:in `<top (required)>'
from /usr/local/bin/jekyll:23:in `load'
from /usr/local/bin/jekyll:23:in `<main>'
Yuriys-MacBook-Pro:Blog Yuriy$ bundle exec jekyll serve
bundler: failed to load command: jekyll (/usr/local/lib/ruby/gems/3.0.0/bin/jekyll)
/usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/html.rb:10:in `require': **cannot load such file -- rexml/parsers/baseparser (** **LoadError** **)**
from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/html.rb:10:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/html.rb:10:in `require'
from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/html.rb:10:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/paragraph.rb:14:in `require'
from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/paragraph.rb:14:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:345:in `require'
from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:345:in `<class:Kramdown>'
from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:60:in `<module:Parser>'
from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:19:in `<module:Kramdown>'
from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:17:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/converters/smartypants.rb:3:in `require'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/converters/smartypants.rb:3:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll.rb:13:in `require'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll.rb:13:in `block in require_all'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll.rb:12:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll.rb:12:in `require_all'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll.rb:194:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/exe/jekyll:8:in `require'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/exe/jekyll:8:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `load'
from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `<top (required)>'
from /Users/Yuriy/.gem/ruby/3.0.0/gems/bundler-2.2.4/lib/bundler/cli/exec.rb:63:in `load'
from /Users/Yuriy/.gem/ruby/3.0.0/gems/bundler-2.2.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
from /Users/Yuriy/.gem/ruby/3.0.0/gems/bundler-2.2.4/lib/bundler/cli/exec.rb:28:in `run'
from /Users/Yuriy/.gem/ruby/3.0.0/gems/bundler-2.2.4/lib/bundler/cli.rb:494:in `exec'
from /Users/Yuriy/.gem/ruby/3.0.0/gems/bundler-2.2.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /Users/Yuriy/.gem/ruby/3.0.0/gems/bundler-2.2.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/Yuriy/.gem/ruby/3.0.0/gems/bundler-2.2.4/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /Users/Yuriy/.gem/ruby/3.0.0/gems/bundler-2.2.4/lib/bundler/cli.rb:30:in `dispatch'
from /Users/Yuriy/.gem/ruby/3.0.0/gems/bundler-2.2.4/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /Users/Yuriy/.gem/ruby/3.0.0/gems/bundler-2.2.4/lib/bundler/cli.rb:24:in `start'
from /Users/Yuriy/.gem/ruby/3.0.0/gems/bundler-2.2.4/exe/bundle:49:in `block in <top (required)>'
from /Users/Yuriy/.gem/ruby/3.0.0/gems/bundler-2.2.4/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
from /Users/Yuriy/.gem/ruby/3.0.0/gems/bundler-2.2.4/exe/bundle:37:in `<top (required)>'
from /usr/local/opt/ruby/bin/bundle:23:in `load'
from /usr/local/opt/ruby/bin/bundle:23:in `<main>'
Two other topics on this help didn’t help. Unfortunately, I have no clue what is going on.
the first one sort of looks like an error in a data file - do you have a data file? csv?
is there a link to your repo you can share?
the second one sort of looks like you have ruby installed twice? once in /usr and another in /Users? i would look and see if you have ruby installed twice, if so uninstall it and then reinstall? I’m not a mac user so maybe this is normal somehow, but it seems suspicious.
$ jekyll s
Configuration file: /Users/Yuriy/Documents/Blog/_config.yml
Source: /Users/Yuriy/Documents/Blog
Destination: /Users/Yuriy/Documents/Blog/_site
Incremental build: disabled. Enable with --incremental
Generating...
jekyll 3.8.7 | Error: wrong number of arguments (given 2, expected 1)
/usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/csv.rb:1656:in `read': wrong number of arguments (given 2, expected 1) (ArgumentError)
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/readers/data_reader.rb:57:in `read_data_file'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/readers/data_reader.rb:46:in `block in read_data_to'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/readers/data_reader.rb:38:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/readers/data_reader.rb:38:in `read_data_to'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/readers/data_reader.rb:20:in `read'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/reader.rb:18:in `read'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/site.rb:164:in `read'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/site.rb:69:in `process'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/command.rb:28:in `process_site'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/commands/build.rb:65:in `build'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/commands/build.rb:36:in `process'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/commands/serve.rb:93:in `block in start'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/commands/serve.rb:93:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/commands/serve.rb:93:in `start'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/commands/serve.rb:75:in `block (2 levels) in init_with_program'
from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/exe/jekyll:15:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `load'
from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `<main>'
At the moment, Jekyll isn’t very compatible with Ruby 3, particularly Jekyll 3.9 (used by Github Pages). I’m using Homebrew (looks like you maybe too), so I’ve had to switch to the ruby@27 formula for now.
Jekyll 3 and 4 will probably get patched in the next few months to run smoothly under Ruby 3, but until then I would avoid it.
$ jekyll s
**Traceback** (most recent call last):
10: from /usr/local/lib/ruby/gems/2.7.0/bin/jekyll:23:in `<main>'
9: from /usr/local/lib/ruby/gems/2.7.0/bin/jekyll:23:in `load'
8: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/exe/jekyll:11:in `<top (required)>'
7: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:52:in `require_from_bundler'
6: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.4/lib/bundler.rb:149:in `setup'
5: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.4/lib/bundler/runtime.rb:26:in `setup'
4: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.4/lib/bundler/runtime.rb:26:in `map'
3: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.4/lib/bundler/spec_set.rb:149:in `each'
2: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.4/lib/bundler/spec_set.rb:149:in `each'
1: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.4/lib/bundler/runtime.rb:31:in `block in setup'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.4/lib/bundler/runtime.rb:302:in `check_for_activated_spec!': **You have already activated i18n 1.8.6, but your Gemfile requires i18n 0.9.5. Prepending `bundle exec` to your command may solve this. (** **Gem::LoadError** **)**
maybe this? your version of that is too new? when you do bundle execute it is probably fixing this. When you do jekyll s it is not? not a bundle user so not sure.
Why do you want to run jekyll without bundler? if you use bundler and it works that is how you are supposed to do it I believe. I don’t think it would be normal to run jekyll both with and without bundler, that would defeat the purpose of bundler.
you could try deleting the i18n that you have then try installing just it as version 0.9.5? then do jekyll s and see if it works.
I think bundler is doing this and that is why it worked.
As @rdyar said, the conventional way to run Jekyll is with bundle exec, which allows you to develop different project with different Jekyll requirements. If you’re only developing Github Pages projects, then you could remove all Jekyll gems except 3.9.0, and then raw jekyll will work (until Github Pages changes its requirements). E.g.:
gem uninstall jekyll:4.2.0
Personally, I define a short alias (j) to make it easier to use bundle exec than not: