Cannot install Jekyll on Mac - attempt to set up Github Blog

I successfully installed Ruby version 1.8.7 and tried to install Jekyll in Terminal using sudo gem install jekyll. Here is the error I get:

ERROR: when executing gem ... (Gem :: FilePermissionError) You do not have write permissions to the / Library / Ruby / Gems / 1.8 directory. unknown68a86d3f981e: ~ srb_1974 $ sudo gem install jekyll Create your own extensions. This may take some time ... ERROR: Error Installing jekyll: ERROR: Failed to create native gem extension.

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

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

Gem files will be installed in / Library / Ruby / Gems / 1.8 / gems / fast-stemmer-1.0.1 for verification. The results are registered in / Library / Ruby / Gems / 1.8 / gems / fast-stemmer-1.0.1 / ext / gem_make.out

I read a bunch of topics, but I can't get anything to work. Many topics say that I should first have Xcode, but it will not even load, much less install. I read that in Lion you need to configure another administrator and install it under this profile, so I did this, but the installation package does not exist. It will not even boot. I think it could be because I'm not a registered Apple developer?

Another recommendation was that I am installing Ruby RVM - this will not be installed either. Here is the command I used: bash <<(curl https://rvm.beginrescueend.com/releases/rvm-install-head )

And here is the error I get:

% Total% Received% Xferd Average Speed ​​Time Time Time Current Dload Download Total Spent Left Speed ​​0 0 0 0 0 0 0 0 -: -: - -: -: - -: -: - 0 curl: (60) Problem With an SSL certificate, make sure the CA certificate is in order. Details: error: 14090086: SSL routines: SSL3_GET_SERVER_CERTIFICATE: certificate verification failed. More details are here: http://curl.haxx.se/docs/sslcerts.html

curl verifies the default SSL certificate using the certificate authority (CA) public key package (CA certificates). If the default package file is not enough, you can specify an alternative file using the --cacert option. If this HTTPS server uses the certificate signed by the CA provided in the kit, the verification certificate probably did not succeed due to a certificate problem (it may have expired, or the name may not match the domain name in the URL). If you want to disable certificate rotation verification, use the -k option (or - insecure). unknown68a86d3f981e: ~ srb_1974 $

I don't care what Ruby RVM and Xcode are to the point that I need to install Jekyll. I am just trying to start my Github blog and I cannot do this. I read, read and read the documentation, and there is something missing for me. I am pretty sure that everyone knows what I have - I do not. I am a beginner programmer. Any help would be greatly appreciated.

+7
source share
4 answers

Ok, that’s how I earned it. It was a random experiment, until something worked.

I installed Xcode and Ruby RVM for others, and the latter led to my resolution. One of the sentences on this page says that they run the “rvm requirements” and read the text. This basically tells you what you need to run and update rubies. This documentation was very helpful. He explained that what I needed to install Jekyll was not really Xcode - it was GCC. Obviously, older versions of Xcode come with GCC, but there are no newer versions, so installing Xcode did not solve my problem. He also directed me to where I could download and install GCC, warning me that installing GCC on a newer version of Xcode is known to cause problems. So, I uninstalled Xcode and went here to install GCC.

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

+9
source

ERROR: Error installing jekyll: ERROR: Failed to create native gem extension.

Therefore, the error "Failed to create your own gem extension." when running the sudo gem install jekyll . You will find a tip in the Jekyll Wiki Installation Section :

If you encounter errors like Failed to create a native gem extension on Windows, you may ... On OSX, you may need to update RubyGems:

$ sudo gem update --system

So, try updating RubyGems and run sudo gem install jekyll after that. And I think you do not need to install ruby ​​rvm unless you are a ruby ​​developer.

By the way, I think Ruby v1.9.1 is the recommended version.


And for your Xcode related question, you can download it from the App Store , although you are not a registered Apple developer. It's free.
Xcode is useful when you need to create some libraries with gcc (gcc will be installed together after installing Xcode). But I do not know if you will need it when you install jekyll.

0
source

I tried all of the above solutions and did not work. I have outlined my answer here:

RVM requirements error

but for brevity, this is what I posted:

It seems that on OSX 10.9 and Xcode5 we have moved some libraries. Therefore, I had to install XCode5-DP6 (Dev Preview 6), open DP6, and in the settings, you should tell the command line tools to use the new DP6 build, and not the standard Xcode from the market.

Firstly, I had to establish a homegrown. Nothing liked playing with macports. I am on my first mac just a month ago, so macports was exactly what apache decided for me at that time. Then I had to run 'brew install autoconf'

As soon as I did this, I ran rvm requirements , everything was installed without problems. then sudo gem install jekyll from there, and now everything works like a charm.

I am sure that one day the Mavericks will be released and it will be flattened. In the end, we use early versions ...

0
source

The same problem arose! After reading this article and random experiments, as shown below,

fixed the problem and was able to successfully install jekyll

0
source

All Articles