Need help with Ruby?

ello Forum,

I am asking for help as I am a total noob here and don’t know what to do.

I had someone do the programming for me, but unfortunately I can no longer reach them.

If I understand correctly, I have a version problem with Ruby.

My configuration is as follows:
MacOS 13.2.1
Ruby ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]
Jekyell I don’t know now, have run commands without success

Here is the error message:
/Users/waldemarbednorz/Documents/Dokumente - MacBook Air von admin/Internetseite/Jekyll/waldemar-master Kopie/vendor/bundle/ruby/3.1.0/gems/forwardable-extended-2.6.0/lib/forwardable/extended.rb:29:in `rb_delegate’: wrong number of arguments (given 2, expected 1) (ArgumentError)

Gemfile:
source “https://rubygems.org
gem “autoprefixer-rails”
gem “html-proofer”
gem “jekyll”
gem “jekyll-archives”
gem “jekyll-assets”
gem “jekyll-paginate”
gem “jekyll-sitemap”
gem “jemoji”
gem “mini_magick”
gem “sass”
gem “uglifier”
gem “webrick”, “~> 1.8”

Gemfile.lock:
EM
remote: https://rubygems.org/
specs:
Ascii85 (1.1.0)
activesupport (5.2.8.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
afm (0.2.2)
async (2.4.0)
console (~> 1.10)
io-event (~> 1.1)
timers (~> 4.1)
autoprefixer-rails (10.4.13.0)
execjs (~> 2)
colorator (1.1.0)
concurrent-ruby (1.2.2)
console (1.16.2)
fiber-local
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
ethon (0.16.0)
ffi (>= 1.15.0)
eventmachine (1.2.7)
execjs (2.8.1)
extras (0.3.0)
forwardable-extended (~> 2.5)
fastimage (2.2.6)
ffi (1.15.5)
fiber-local (1.0.0)
forwardable-extended (2.6.0)
gemoji (4.0.1)
hashery (2.1.2)
html-pipeline (2.14.3)
activesupport (>= 2)
nokogiri (>= 1.4)
html-proofer (5.0.4)
addressable (~> 2.3)
async (~> 2.1)
nokogiri (~> 1.13)
pdf-reader (~> 2.11)
rainbow (~> 3.0)
typhoeus (~> 1.3)
yell (~> 2.0)
zeitwerk (~> 2.5)
http_parser.rb (0.8.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
io-event (1.1.6)
jekyll (3.9.3)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (>= 0.7, < 2)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 2.0)
kramdown (>= 1.17, < 3)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-archives (2.2.1)
jekyll (>= 3.6, < 5.0)
jekyll-assets (3.0.12)
activesupport (~> 5.0)
execjs (~> 2.7)
extras (~> 0.2)
fastimage (~> 2.0, >= 1.8)
jekyll (>= 3.5, < 4.0)
jekyll-sanity (~> 1.2)
liquid-tag-parser (~> 1.0)
nokogiri (~> 1.8)
pathutil (~> 0.16)
sprockets (>= 3.3, < 4.1.beta)
jekyll-paginate (1.1.0)
jekyll-sanity (1.6.0)
jekyll (>= 3.1, < 5.0)
pathutil (~> 0.16)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
jemoji (0.13.0)
gemoji (>= 3, < 5)
html-pipeline (~> 2.2)
jekyll (>= 3.0, < 5.0)
kramdown (2.4.0)
rexml
liquid (4.0.4)
liquid-tag-parser (1.9.0)
extras (~> 0.3)
liquid (>= 3.0, < 5.0)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
mini_magick (4.12.0)
minitest (5.17.0)
nokogiri (1.14.2-arm64-darwin)
racc (~> 1.4)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
pdf-reader (2.11.0)
Ascii85 (~> 1.0)
afm (~> 0.2.1)
hashery (~> 2.0)
ruby-rc4
ttfunk
public_suffix (5.0.1)
racc (1.6.2)
rack (2.2.6.2)
rainbow (3.1.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (3.30.0)
ruby-rc4 (0.1.5)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sprockets (4.0.3)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
thread_safe (0.3.6)
timers (4.3.5)
ttfunk (1.7.0)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.11)
thread_safe (~> 0.1)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
webrick (1.8.1)
yell (2.2.2)
zeitwerk (2.6.7)

PLATFORMS
arm64-darwin-22

DEPENDENCIES
autoprefixer-rails
html-proofer
jekyll
jekyll-archives
jekyll-assets
jekyll-paginate
jekyll-sitemap
jemoji
mini_magick
sass
uglifier
webrick (~> 1.8)

BUNDLED WITH
2.4.7

If you need more information let me know.

Thank you for your help and reply.

All the best and a nice weekend

Waldemar

Additional Information:
from /Users/waldemarbednorz/Documents/Dokumente - MacBook Air von admin/Internetseite/Jekyll/waldemar-master Kopie/vendor/bundle/ruby/3.1.0/gems/liquid-tag-parser-1.9.0/lib/liquid/tag/parser.rb:34:in `class:Parser

from /Users/waldemarbednorz/Documents/Dokumente - MacBook Air von admin/Internetseite/Jekyll/waldemar-master Kopie/vendor/bundle/ruby/3.1.0/gems/liquid-tag-parser-1.9.0/lib/liquid/tag/parser.rb:12:in `class:Tag

you could try a few things:

  • delete the gemfile.lock and see what happens. Assuming you have it in git to fall back on. if not rename it to .old or something.
  • try uninstalling ruby and then re-install ruby 2.7

also - list the full out put of the console when you try running jekyll. Often times the non-error lines help shed light on the issue.

1 Like

Hello rydar,

thank you very much for answer and help.

  • delete the gemfile.lock and see what happens. Assuming you have it in git to fall back on. if not rename it to .old or something.
    didn’t work

  • try uninstalling ruby and then re-install ruby 2.7
    got a new error
    waldemarbednorz@MacBook-Air-von-admin waldemar-master Kopie % bundle exec jekyll build
    Configuration file: /Users/waldemarbednorz/Documents/Dokumente - MacBook Air von admin/Internetseite/Jekyll/waldemar-master Kopie/_config.yml
    Source: /Users/waldemarbednorz/Documents/Dokumente - MacBook Air von admin/Internetseite/Jekyll/waldemar-master Kopie
    Destination: /Users/waldemarbednorz/Documents/Dokumente - MacBook Air von admin/Internetseite/Jekyll/waldemar-master Kopie/_site
    Incremental build: disabled. Enable with --incremental
    Generating…
    jekyll 3.9.3 | Error: wrong number of arguments (given 2, expected 1)

All the best

Waldemar

please paste the whole contents of the console including the command you typed.

Here the full command:
waldemarbednorz@MacBook-Air-von-admin waldemar-master Kopie % bundle exec jekyll serve
Configuration file: /Users/waldemarbednorz/Documents/Dokumente - MacBook Air von admin/Internetseite/Jekyll/waldemar-master Kopie/_config.yml
** Source: /Users/waldemarbednorz/Documents/Dokumente - MacBook Air von admin/Internetseite/Jekyll/waldemar-master Kopie**
** Destination: /Users/waldemarbednorz/Documents/Dokumente - MacBook Air von admin/Internetseite/Jekyll/waldemar-master Kopie/_site**
** Incremental build: disabled. Enable with --incremental**
** Generating… **
jekyll 3.9.3 | Error: wrong number of arguments (given 2, expected 1)

if you google jekyll 3.9.3 | Error: wrong number of arguments (given 2, expected 1) you should find some things talking about sprockets version 4 being an issue. I think that is used by jekyll-assets. Are you using that? where did the site come from? something new you created or something you cloned from somewhere?

where did the site come from? something new you created or something you cloned from somewhere?
It is something new that someone created. I contact him but without any response in the moment.

With the command ‘bunde Install’ a new folder “vendor” was created.
Here are the sprockets.

I did not have this folder before.

Sorry i’m not the profi :wink:
Here the last trace file attach.

Here the gem env

it has something to do with a plugin called jekyll-assets that is using a thing called sprockets.

I don’t use either, your best bet is to google that error and see what other people did to fix it. Maybe by either downgrading or upgrading jekyll? or maybe ruby.

Jekyll-assets is not required by jekyll, it is a plugin that does something for handling asset files. It doesn’t look like it is maintened any more? I’d try to not use it personally.

Thank you very much for your help.
Upgrading or downgrading is more like playing the lottery.
I don’t really understand the problem, which already starts with the command ‘Bundle install’ which creates a new folder which was not there before.
I’m just a noob.

Have you tried this solution? ruby - Jekyll: wrong number of arguments (given 2, expected 1) (ArgumentError) - Stack Overflow

You have a bundle subfolder because you should have a bundle config file, probably in the same project folder, telling bundle to install the gems there. Look among the hidden file if you have .bundle/config or something similar

Thanks for help and answer.
I try this now i get this error.





If i remember well must replace:

{{ page.og_image | asset_path }}

with:

{% asset '{{page.og_image}}' @path %}

and

{% asset_path og-image.jpg %}

with:

{% asset og-image.jpg @path %}

Thank you your fast answer and help.
I got the same error message.
Maybe i do something wrong.
Please look attach.


Look: it must be asset in place of asset_path

Thank you very much, now I understand.
This problem is now solved.
Of course, it is not yet completely solved.
As I said, I am not a programmer.
I try but it doesn’t always work.
The current error has something to do with the stylesheet which I have already commented out in the head.html file without success.
Attached is the error message.



This must still be related to the jekyll-assets gem which you updated with bundle update but the theme still references the old version.

In that case, replace stylesheet with asset and append the .css extensions to the files:

{% stylesheet light %}
becomes:
{% asset light.css %}

and:
{% stylesheet dark %}
becomes:
{% asset dark.css %}

This tag simply introduces a link tag to embed the dark or light (S)CSS files, depending from the conditional if, which should be both in your _assets/css or similar subfolder.

Sorry for the late reply.
Please find attached the two files.
But here is the code: {% stylesheet light %} is not included.

Many thanks for your further help.