Se você estiver instalando o ruby 2.2.1 no openSUSE, mas obtiver um erro como o abaixo. Tudo o que você precisa fazer é instalar o pacote libffi-devel-gcc5
e pronto.
erro:
$ rbenv install 2.2.1
Downloading ruby-2.2.1.tar.gz... -> https://dqw8nmjcqpjn7.cloudfront.net/5a4de38068eca8919cb087d338c0c2e3d72c9382c804fb27ab746e6c7819ab28
Installing ruby-2.2.1...
BUILD FAILED (SUSE LINUX 42.1 using ruby-build 20151028-4-gf71dbc9)
Inspect or clean up the working tree at /tmp/ruby-build.20151109133848.4063
Results logged to /tmp/ruby-build.20151109133848.4063.log
Last 10 log lines:
compiling ossl_rand.c
installing default openssl libraries
installing default psych libraries
linking shared-object psych.so
linking shared-object openssl.so
make[2]: Leaving directory '/tmp/ruby-build.20151109133848.4063/ruby-2.2.1/ext/psych'
make[2]: Leaving directory '/tmp/ruby-build.20151109133848.4063/ruby-2.2.1/ext/openssl'
make[1]: Leaving directory '/tmp/ruby-build.20151109133848.4063/ruby-2.2.1'
uncommon.mk:189: recipe for target 'build-ext' failed
make: *** [build-ext] Error 2
solução:
zypper in libffi-devel-gcc5