An error occurred while installing ffi (1.9.21), and Bundler cannot continue. Make sure that `gem install ffi -v '1.9.21'` succeeds before bundling
Asked Answered
D

3

5

This is my first question on SO, so I hope it's ok that I'm doing this. I have now had this problem twice and pulled my hair out searching for an answer. I found it the first time, and then forgot what the solution was. Now that I have worked it out again I wanted to make sure other people don't struggle with it because it's really simple in the end.

All I'm trying to do is make a new Jekyll site, which I've done tons of times before. It's all fine until I try to bundle anything, and then I get the error in the title of this question. I'm on macOS Sierra, and have updated it from El Capitain since last using Jekyll. Same last time, on my other computer.

Running gem install ffi -v '1.9.21' gives the following error:

ERROR:  While executing gem ... (Errno::EACCES)
Permission denied @ rb_sysopen - /usr/local/lib/ruby/gems/2.4.0/gems/ffi-1.9.21/COPYING

I'm not sure whether to give the answer here or let somebody else answer it. I just want to be able to find this question next time I forget and try every other ffi-related thing on the internet!

Downtown answered 16/2, 2018 at 2:25 Comment(0)
D
6

I'm just going to answer it. I needed to re-install the command line dev tools because I had updated my OS.

A simple xcode-select --install and then posted this question while I waited.

Kinda face-palm, but definitely not obvious if you try Googling the error messages!

Can't believe I did this twice.

Downtown answered 16/2, 2018 at 2:44 Comment(0)
R
3

This worked for me on my Mac:

gem install ffi -v '1.9.18' -- --with-cflags="-Wno-error=implicit-function-declaration"
Rora answered 26/8, 2021 at 4:38 Comment(0)
C
0

Yes , i did , for mac should update a system , then wel be work....

Cromagnon answered 16/2, 2018 at 10:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.