Can't read csv file

I’m trying to read my csv file in the _data folder following the official documentation, and I’m having trouble with it. I don’t know much about ruby, and below is the output.

bundle exec jekyll serve --trace

Configuration file: /Volumes/programs/elx/elx6.xyz/_config.yml
Source: /Volumes/programs/elx/elx6.xyz
Destination: /Volumes/programs/elx/elx6.xyz/_site
Incremental build: disabled. Enable with --incremental
Generating…
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/csv-3.1.9/lib/csv.rb:1667:in read': wrong number of arguments (given 2, expected 1) (ArgumentError) from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/readers/data_reader.rb:57:in read_data_file’
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/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.9.0/lib/jekyll/readers/data_reader.rb:38:in each’
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/readers/data_reader.rb:38:in read_data_to' from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/readers/data_reader.rb:20:in read’
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/reader.rb:18:in read' from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/site.rb:164:in read’
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/site.rb:69:in process' from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/command.rb:28:in process_site’
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/commands/build.rb:65:in build' from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/commands/build.rb:36:in process’
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in block in start' from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in each’
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in start' from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/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.9.0/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 <top (required)>’
from /Users/tony/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/cli/exec.rb:63:in load' from /Users/tony/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/cli/exec.rb:63:in kernel_load’
from /Users/tony/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/cli/exec.rb:28:in run' from /Users/tony/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:494:in exec’
from /Users/tony/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' from /Users/tony/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command’
from /Users/tony/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch' from /Users/tony/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:30:in dispatch’
from /Users/tony/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start' from /Users/tony/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:24:in start’
from /Users/tony/.gem/ruby/3.0.0/gems/bundler-2.2.16/exe/bundle:49:in block in <top (required)>' from /Users/tony/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/friendly_errors.rb:130:in with_friendly_errors’
from /Users/tony/.gem/ruby/3.0.0/gems/bundler-2.2.16/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 `’

Jekyll 3 isn’t fully compatible with Ruby 3, so you’ll need to use Ruby 2.

1 Like

Thank you very much, and the problem is solved.

1 Like