0

when i do rvm install ruby-2.2.5 i am getting errors. any idea why?

M1620661:Wellness_service us044466$ rvm install ruby-2.2.5
ruby-2.2.5 - #removing src/ruby-2.2.5..
Searching for binary rubies, this might take some time.
Found remote file https://rvm_io.global.ssl.fastly.net/binaries/osx/10.11/x86_64/ruby-2.2.5.tar.bz2
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
ruby-2.2.5 - #configure
ruby-2.2.5 - #download
ruby-2.2.5 - #validate archive
ruby-2.2.5 - #extract
ruby-2.2.5 - #validate binary
Libraries missing for ruby-2.2.5: /usr/local/opt/gmp/lib/libgmp.10.dylib. Refer to your system manual for installing libraries
Mounting remote ruby failed with status 10, trying to compile.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Warning: found user selected compiler '/usr/local/opt/apple-gcc42/bin/gcc-4.2', this will suppress RVM auto detection mechanisms.
Installing Ruby from source to: /Users/us044466/.rvm/rubies/ruby-2.2.5, this may take a while depending on your cpu(s)...
ruby-2.2.5 - #downloading ruby-2.2.5, this may take a while depending on your connection...
ruby-2.2.5 - #extracting ruby-2.2.5 to /Users/us044466/.rvm/src/ruby-2.2.5....
ruby-2.2.5 - #configuring......
Error running './configure --prefix=/Users/us044466/.rvm/rubies/ruby-2.2.5 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl:/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --disable-install-doc --enable-shared',
showing last 15 lines of /Users/us044466/.rvm/log/1478196378_ruby-2.2.5/configure.log
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for cd using physical directory... cd -P
checking whether CFLAGS is valid... no
configure: error: something wrong with CFLAGS="-g -O2 "
There has been an error while running configure. Halting the installation.
ArtOfCode
  • 5,702
  • 5
  • 37
  • 56
User7354632781
  • 2,174
  • 9
  • 31
  • 54
  • Do you need 2.2.5 specifically? Why not try 2.3.1? – tadman Nov 03 '16 at 18:20
  • I cloned a repo and when i do bundle install i am getting error ruby_dep-1.5.0 requires ruby version >= 2.2.5, ~> 2.2, which is incompatible with the current version, ruby 2.0.0p648 – User7354632781 Nov 03 '16 at 18:34
  • Well, 2.3.1 meets those requirements and might have fixed the issue you're having here. It looks like you're missing the `libgmp` library, and usually RVM is pretty good about getting these dependencies lined up. – tadman Nov 03 '16 at 18:34

2 Answers2

1

this one worked like charm

rvm install 2.2.5 --with-gcc=clang  
User7354632781
  • 2,174
  • 9
  • 31
  • 54
-1

You haven't given us much information here. What OS are you running? Which version?
According to this issue on the Ruby GitHub page, you may be able to workaround the issue by using GCC to install with like this: CC=/usr/bin/gcc rvm install ruby-2.2.5, assuming you have GCC installed to /usr/bin/gcc

CyanBlob
  • 64
  • 1
  • 7