# Persistent ruby setup error

**URL:** <https://talk.jekyllrb.com/t/persistent-ruby-setup-error/3731>\
**Category:** Help\
**Created:** [December 25, 2019, 3:57am UTC](https://talk.jekyllrb.com/t/persistent-ruby-setup-error/3731 "2019-12-25T03:57:05Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![monica](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/monica/32/2123_2.png) [@monica](https://talk.jekyllrb.com/u/monica)\
**Post date:** [December 25, 2019, 3:57am UTC](https://talk.jekyllrb.com/t/persistent-ruby-setup-error/3731/1 "2019-12-25T03:57:05Z")

</div>

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

```auto
/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

```auto
/Users/monica/.gem/ruby/2.6.0/bin:/usr/local/opt/ruby/bin:/Users/monica/.rvm/gems/ruby-2.6.3/bin:/Users/monica/.rvm/gems/ruby-2.6.3@global/bin:/Users/monica/.rvm/rubies/ruby-2.6.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/monica/.rvm/bin:/Users/monica/.rvm/bin

```

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.  
-Monica

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [December 25, 2019, 4:49pm UTC](https://talk.jekyllrb.com/t/persistent-ruby-setup-error/3731/2 "2019-12-25T16:49:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![monica](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/monica/32/2123_2.png) [@monica](https://talk.jekyllrb.com/u/monica)\
**Post date:** [December 25, 2019, 7:46pm UTC](https://talk.jekyllrb.com/t/persistent-ruby-setup-error/3731/3 "2019-12-25T19:46:13Z")

</div>

Hi rdyar,

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

> **[mgnica/mgnica.github.io](https://github.com/mgnica/mgnica.github.io)**
>
> personal site. Contribute to mgnica/mgnica.github.io development by creating an account on GitHub.

  
[mgnica.github.io](http://mgnica.github.io)

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [December 25, 2019, 8:43pm UTC](https://talk.jekyllrb.com/t/persistent-ruby-setup-error/3731/4 "2019-12-25T20:43:12Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![monica](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/monica/32/2123_2.png) [@monica](https://talk.jekyllrb.com/u/monica)\
**Post date:** [December 25, 2019, 9:03pm UTC](https://talk.jekyllrb.com/t/persistent-ruby-setup-error/3731/5 "2019-12-25T21:03:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [December 25, 2019, 9:35pm UTC](https://talk.jekyllrb.com/t/persistent-ruby-setup-error/3731/6 "2019-12-25T21:35:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![monica](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/monica/32/2123_2.png) [@monica](https://talk.jekyllrb.com/u/monica)\
**Post date:** [December 25, 2019, 9:40pm UTC](https://talk.jekyllrb.com/t/persistent-ruby-setup-error/3731/7 "2019-12-25T21:40:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [December 26, 2019, 2:40am UTC](https://talk.jekyllrb.com/t/persistent-ruby-setup-error/3731/8 "2019-12-26T02:40:43Z")

</div>

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

```auto
---
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 /.

---

<div class="post-metadata">

**Author:** ![monica](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/monica/32/2123_2.png) [@monica](https://talk.jekyllrb.com/u/monica)\
**Post date:** [December 26, 2019, 5:46am UTC](https://talk.jekyllrb.com/t/persistent-ruby-setup-error/3731/9 "2019-12-26T05:46:27Z")

</div>

Hi rdyar,

Thank you - it’s all set up and it looks a lot better now 🙂  
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

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [December 26, 2019, 6:35am UTC](https://talk.jekyllrb.com/t/persistent-ruby-setup-error/3731/10 "2019-12-26T06:35:11Z")

</div>

> [@monica](#):
>
> everything in \_site is generated by jekyll

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.

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [December 26, 2019, 6:39am UTC](https://talk.jekyllrb.com/t/persistent-ruby-setup-error/3731/11 "2019-12-26T06:39:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Mdata009](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@Mdata009](https://talk.jekyllrb.com/u/Mdata009)\
**Post date:** [February 11, 2021, 5:24am UTC](https://talk.jekyllrb.com/t/persistent-ruby-setup-error/3731/12 "2021-02-11T05:24:02Z")

</div>

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.
