Error in Jekyll installation

Hi,

on entering command:

jekyll -v

Here’s the output I’m getting

**Traceback** (most recent call last):

21: from /Users/asaiatin/.gem/ruby/2.6.0/bin/jekyll:23:in `<main>'

20: from /Users/asaiatin/.gem/ruby/2.6.0/bin/jekyll:23:in `load'

19: from /Users/asaiatin/.gem/gems/jekyll-4.2.0/exe/jekyll:8:in `<top (required)>'

18: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

17: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

16: from /Users/asaiatin/.gem/gems/jekyll-4.2.0/lib/jekyll.rb:195:in `<top (required)>'

15: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

14: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

13: from /Users/asaiatin/.gem/gems/jekyll-sass-converter-2.1.0/lib/jekyll-sass-converter.rb:4:in `<top (required)>'

12: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

11: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

10: from /Users/asaiatin/.gem/gems/jekyll-sass-converter-2.1.0/lib/jekyll/converters/scss.rb:3:in `<top (required)>'

9: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

8: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

7: from /Users/asaiatin/.gem/gems/sassc-2.4.0/lib/sassc.rb:31:in `<top (required)>'

6: from /Users/asaiatin/.gem/gems/sassc-2.4.0/lib/sassc.rb:31:in `require_relative'

5: from /Users/asaiatin/.gem/gems/sassc-2.4.0/lib/sassc/native.rb:3:in `<top (required)>'

4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

2: from /Users/asaiatin/.gem/gems/ffi-1.15.0/lib/ffi.rb:4:in `<top (required)>'

1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': **cannot load such file -- 2.6/ffi_c (** **LoadError** **)**

22: from /Users/asaiatin/.gem/ruby/2.6.0/bin/jekyll:23:in `<main>'

21: from /Users/asaiatin/.gem/ruby/2.6.0/bin/jekyll:23:in `load'

20: from /Users/asaiatin/.gem/gems/jekyll-4.2.0/exe/jekyll:8:in `<top (required)>'

19: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

18: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

17: from /Users/asaiatin/.gem/gems/jekyll-4.2.0/lib/jekyll.rb:195:in `<top (required)>'

16: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

15: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

14: from /Users/asaiatin/.gem/gems/jekyll-sass-converter-2.1.0/lib/jekyll-sass-converter.rb:4:in `<top (required)>'

13: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

12: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

11: from /Users/asaiatin/.gem/gems/jekyll-sass-converter-2.1.0/lib/jekyll/converters/scss.rb:3:in `<top (required)>'

10: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

9: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

8: from /Users/asaiatin/.gem/gems/sassc-2.4.0/lib/sassc.rb:31:in `<top (required)>'

7: from /Users/asaiatin/.gem/gems/sassc-2.4.0/lib/sassc.rb:31:in `require_relative'

6: from /Users/asaiatin/.gem/gems/sassc-2.4.0/lib/sassc/native.rb:3:in `<top (required)>'

5: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

3: from /Users/asaiatin/.gem/gems/ffi-1.15.0/lib/ffi.rb:3:in `<top (required)>'

2: from /Users/asaiatin/.gem/gems/ffi-1.15.0/lib/ffi.rb:6:in `rescue in <top (required)>'

1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': **dlopen(/Users/asaiatin/.gem/gems/ffi-1.15.0/lib/ffi_c.bundle, 0x0009): missing compatible arch in /Users/asaiatin/.gem/gems/ffi-1.15.0/lib/ffi_c.bundle - /Users/asaiatin/.gem/gems/ffi-1.15.0/lib/ffi_c.bundle (** **LoadError** **)**

No idea what went wrong, can someone pls help.

what os?

it looks like you have ruby installed in 2 places - Users/ and System/.

It looks to be trying to use both at the same time and is confused. You might try uninstalling ruby, then checking to see if it is still installed, then re-install it. There is probably a way to manage ruby and tell it to use one or the other but that isn’t something I have any experience with.

More specifically, Jekyll is installed in User gems while RubyGems is being access in System

I haven’t seen System path accessed before.

If you have a Brew installed Ruby, make sure it appears in your path and it should end up before the system Ruby.

You can also update your installed gems, with or without sudo, to get newer versions that can help with installs

You can also update your installed gems, with or without sudo, to get newer versions that can help with installs

# Upgrade just RubyGems gems.
gem update --system
# Upgrade all global gems.
gem update

Thanks, I used rbenv to sort it out, and it seemed like working. But when I try the serve command, I see this:

/Users/asaiatin/.gem/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve/servlet.rb:3:in `require’: cannot load such file – webrick ( LoadError )

from /Users/asaiatin/.gem/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve/servlet.rb:3:in `<top (required)>’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:179:in `require_relative’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:179:in `setup’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:100:in `process’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `each’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `process_with_graceful_fail’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/jekyll-4.2.0/exe/jekyll:15:in `<top (required)>’

from /Users/asaiatin/.gem/ruby/3.0.0/bin/jekyll:23:in `load’

from /Users/asaiatin/.gem/ruby/3.0.0/bin/jekyll:23:in `<top (required)>’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/cli/exec.rb:63:in `load’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/cli/exec.rb:63:in `kernel_load’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/cli/exec.rb:28:in `run’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:494:in `exec’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:30:in `dispatch’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:24:in `start’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/bundler-2.2.16/exe/bundle:49:in `block in <top (required)>’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors’

from /Users/asaiatin/.gem/ruby/3.0.0/gems/bundler-2.2.16/exe/bundle:37:in `<top (required)>’

from /Users/asaiatin/.rbenv/versions/3.0.0/bin/bundle:23:in `load’

from /Users/asaiatin/.rbenv/versions/3.0.0/bin/bundle:23:in `’

there is an issue with ruby 3 - see this post:

looks like webrick may be missing, try bundle add webrick which is what the solution to that post looks to be.

2 Likes