Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

You are probably searching for Error running '__rvm_make -j 1'
That only says, that something went wrong while compiling ruby. This question is only relevant to you if openssl and/or ossl_ssl is part of your error message.
But maybe your problem is a similar one and you can solve your problem with some customizations.

Background
Today I wanted to delete all gems of a project but forgot to specify a path for bundler beforehand so all gems where installed in ~/.rvm/gems/ruby-2.2.4/gems/ .

As it's the only ruby 2.2.4 project I though rm -rf ~/.rvm/gems/ruby-2.2.4/gems/* would be perfectly fine. It wasn't. Bundler was gone and gem install bundler didn't worked anymore as well.

I removed the hole ruby installation with rvm remove ruby-2.2.4 ant tried to reinstall it. This is the console output with the error I got:

Console output

> rvm install ruby-2.2.4
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.11/x86_64/ruby-2.2.4.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/fkammer/.rvm/rubies/ruby-2.2.4, this may take a while depending on your cpu(s)...
ruby-2.2.4 - #downloading ruby-2.2.4, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 12.7M  100 12.7M    0     0   655k      0  0:00:19  0:00:19 --:--:--  234k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.2.4 - #extracting ruby-2.2.4 to /Users/fkammer/.rvm/src/ruby-2.2.4....
ruby-2.2.4 - #configuring..........................................................
ruby-2.2.4 - #post-configuration.
ruby-2.2.4 - #compiling..............................................................
Error running '__rvm_make -j 1',
showing last 15 lines of /Users/fkammer/.rvm/log/1456431932_ruby-2.2.4/make.log
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ossl_ssl.c:19:35: note: expanded from macro 'numberof'
#define numberof(ary) (int)(sizeof(ary)/sizeof((ary)[0]))
                                  ^~~~~
ossl_ssl.c:2217:21: error: invalid application of 'sizeof' to an incomplete type 'const struct (anonymous struct at ossl_ssl.c:115:14) []'
    for (i = 0; i < numberof(ossl_ssl_method_tab); i++) {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ossl_ssl.c:19:35: note: expanded from macro 'numberof'
#define numberof(ary) (int)(sizeof(ary)/sizeof((ary)[0]))
                                  ^~~~~
9 errors generated.
make[2]: *** [ossl_ssl.o] Error 1
make[1]: *** [ext/openssl/all] Error 2
make: *** [build-ext] Error 2
++ return 2
There has been an error while running make. Halting the installation.

Retrying does not change anything. I also tried to completely uninstall rvm (rvm implode) and reinstall it but that was neither successful.

System
Mac OS X – El Capitan (10.11.3)
rvm 1.26.11 (latest)
Homebrew 0.9.5

Looks like there is a problem with openssl.

rvm uses homebrew as its package manager on my installation (it's the default I guess). You can ensure that with rvm autolibs homebrew.

I reinstalled openssl with

brew reinstall openssl

and saw via brew list that there was another openssl package called openssl098 installed on my system. Trying to reinstall it too caused the following error:

> brew reinstall openssl098
Error: No available formula with the name "openssl098"

I just removed the package with

brew uninstall --force openssl098

and reinstalled openssl again to be sure openssl098 wasn't a needed dependency. But it wasn't installed again.

Afterwards I tried installing ruby-2.2.4 via rvm again and it worked like a charm :) So I guess my openssl package was broken for some reason.

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.