Persistent ruby setup error

Hi all, it’s my first post! Hi!
I have 2 issues with jekyll.
First is when I run jekyll build I get this error

/Users/monica/.rvm/gems/ruby-2.6.3/gems/ffi-1.11.3/lib/ffi.rb:6:in `require': incompatible library version - /Users/monica/.rvm/gems/ruby-2.6.3/gems/ffi-1.11.3/lib/ffi_c.bundle (LoadError)

this is my $PATH var for reference


The second is that Jekyll is not loading in my template theme (self-created), but that might be solved with fixing the first main problem.

Please help, SOS.

no idea about first one (site still builds ok?)

If your theme is not loading that sounds like a css issue, if you use the Inspector in Chrome and go to the Console tab are that errors?

Is there a link to the repo/site?

fairly common to use GH pages for a project repo but not set the baseurl in the config file to the repo name.

Hi rdyar,

No I can’t actually build locally anymore, but on Github pages it works.

what OS?

how did you install jekyll? what do you get if you run jekyll --version

sort seems like not everything it needs is installed, try gem install jekyll again maybe?

MacOS Mojave 10.14.6

I get the same error if I run jekyll --version
I tried gem install jekyll and reran jekyll --version and got the same error.

maybe try:

gem install ffi

you could also try running rvm gemset empty followed by gem install bundler and bundle install but I am just copying and pasting this off the interweb, I don’t know much about ruby at all.

I actually realized it never worked on this computer, only on my work computer which is same OS. I diffed the paths and there are some missing on this current computer. That’s probably the error. I’ll also try gem install ffi.

Edit: gem install ffi totally worked! niicceee

As for the css, no I’m not seeing any errors, but I did notice that the

layout: starspace
title: mgnica’s webpage : D

is surrounded by quotes which I don’t think are supposed to be there.

Edit: yeah, please help me get my theme working. The links are all correct it’s just giving a 404 for some reason.

1 Like

correct - the front matter is always at the top of the page so move:

layout: starspace
title: mgnica's webpage :D

up to the top.

Your assets/css/styles.css should be called styles.scss - it is not importing the main.scss file because a css file cannot do that, needs to be named .scss, when jekyll runs it will process the scss and rename it to .css.

I think I also saw a couple other path issues but not sure. Somewhere I saw a path as assets/abc.. when it should be /assets/abc... - it was missing the leading /.

1 Like

Hi rdyar,

Thank you - it’s all set up and it looks a lot better now :slight_smile:
Does jekyll always have index.html in root and index.html in _site? I am getting confused over that.
Actually, in general I’m getting confused on where to create and put new pages for my site. For example, I want to add piquant.html under _site but it doesn’t seem to like that. And sometimes my image links break without me doing anything to them.

Edit: OK, everything in _site is generated by jekyll. Why does my javascript get constantly written over whenever I modify it? I’m not sure where else to modify the javascript. It’s ruining the actually built Github page too

correct, the entire contents of _site get deleted and then rebuild every time jekyll runs, so you never edit anything in there.

If you have JS then just put it in a assets/js folder or where ever you want it (in the root), and it will be copied to that same location in the _site folder when jekyll runs.

and you generally should not have the _site folder on GH - you should ignore it in Git and delete it.

Editing something in the _site folder on GH is not going to do anything, GH is making its own version of your _site folder from your source and serving that.

I had the exact same issue that Monica faced, and “gem install ffi” totally worked!!!
Thanks Monica for raising and thanks rdyar for the solution.

1 Like