Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't install Jekyll on Mac - trying to set up Github Blog

Tags:

github

jekyll

I sucessfully installed Ruby, version 1.8.7 and have been trying to install Jekyll in the Terminal using sudo gem install jekyll. Here's the error I get:

ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions into the /Library/Ruby/Gems/1.8 directory. unknown68a86d3f981e:~ srb_1974$ sudo gem install jekyll Building native extensions. This could take a while... ERROR: Error installing jekyll: ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

extconf.rb mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h

Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/fast-stemmer-1.0.1 for inspection. Results logged to /Library/Ruby/Gems/1.8/gems/fast-stemmer-1.0.1/ext/gem_make.out

I've read a bunch of topics, but can't get anything to work. Many topics say I have to have XCode first, but it won't even download, much less install. I read that in Lion you have to set up another administrator and install it under that profile, so I did that, but the install package doesn't exist. It won't even download. I think this may be because I'm not a registered Apple Developer?

Another recommendation was that I install Ruby RVM - this also won't install. Here's the command I used: bash < <( curl https://rvm.beginrescueend.com/releases/rvm-install-head )

And here's the error I get:

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option. If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL). If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option. unknown68a86d3f981e:~ srb_1974$

I only care about Ruby RVM and XCode to the extent that I need them to install Jekyll. I'm just trying to get my Github blog going and I can't seem to do it. I've read and read and read documentation and there's something I'm missing. I'm pretty sure it's knowledge everyone's assuming I have - I don't. I'm a beginner programmer. Any help would be much appreciated.

like image 922
Stacey Baker Avatar asked Jul 12 '12 23:07

Stacey Baker


1 Answers

Ok, here's how I got it to work. It was kind of a random experimentation process until something worked.

I installed XCode and Ruby RVM per others' suggestions and the latter led to my resolution. One of the suggestions on this page said to run "rvm requirements" and read the text. It basically tells you what you need to run & upgrade rubies. This documentation was quite helpful. It explained that what I needed to install Jekyll wasn't really XCode - it was GCC. Evidently, older versions of XCode came with GCC, but newer versions do not, which is why installing XCode didn't solve my problem. It also directed me to where I could download & install GCC, warning me that installing GCC over a newer version of XCode is known to cause problems. So, I uninstalled XCode & headed over here to install GCC.

It was that simple - I installed GCC and Jekyll installed in seconds.

like image 152
Stacey Baker Avatar answered Nov 03 '22 01:11

Stacey Baker