rvm / rvm1-ansible

The official ansible RVM role to install and manage your Ruby versions.
MIT License
271 stars 136 forks source link

Installation of Ruby 2.5.0 is not possible with rvm #178

Closed mmolinac closed 4 years ago

mmolinac commented 6 years ago

Since some months ago, it's not possible for us to install Ruby 2.5.0 with this role. As it turned out, it seems that RVM has changed. I opened a ticket to them, https://github.com/rvm/rvm/issues/4443 , but it seems that the proposed solution for this version is to install other version by package. As your role is affected because it doesn't work with this version, I ask you to change this role.

When we try to install with your role, the process ends like this (I was able to reproduce the error):

$ ./.rvm/bin/rvm install ruby-2.5.0
ruby-2.5.0 - #removing src/ruby-2.5.0..
Searching for binary rubies, this might take some time.
No binary rubies available for: debian/9/x86_64/ruby-2.5.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for debian.
Requirements installation successful.
Installing Ruby from source to: /var/lib/jenkins/.rvm/rubies/ruby-2.5.0, this may take a while depending on your cpu(s)...
ruby-2.5.0 - #downloading ruby-2.5.0, this may take a while depending on your connection...
ruby-2.5.0 - #extracting ruby-2.5.0 to /var/lib/jenkins/.rvm/src/ruby-2.5.0.....
ruby-2.5.0 - #applying patch /var/lib/jenkins/.rvm/patches/ruby/2.5.0/prelude_gcc_diagnostic.patch.
ruby-2.5.0 - #configuring...................................................................
ruby-2.5.0 - #post-configuration..
ruby-2.5.0 - #compiling...
Error running '__rvm_make -j4',
please read /var/lib/jenkins/.rvm/log/1537787848_ruby-2.5.0/make.log
There has been an error while running make. Halting the installation.

And the last lines from the log file are:

compiling ./main.c
compiling dmydln.c
compiling miniinit.c
compiling dmyext.c
generating miniprelude.c
executable host ruby is required. use --with-baseruby option.
uncommon.mk:960: recipe for target 'miniprelude.c' failed
make: *** [miniprelude.c] Error 1
make: *** Waiting for unfinished jobs....
++ return 2

If you're unable to fix this, could it be possible to add parameters so the compilation process of Ruby 2.5.0 could take advantage of a previous RVM installation of another version, say 2.3.1 ?

mmolinac commented 5 years ago

Nobody can add any light here ?

lpaulmp commented 5 years ago

I'd love to have someone involve here who can contribute to add this future. If you have that time would be awesome.

thbar commented 5 years ago

@mmolinac ruby 2.5.0 is one year old. Could you instead try to install 2.5.3, and report back if it also fails?

pkuczynski commented 5 years ago

@mmolinac can you do as suggested in the other thread:

yum install ruby
rvm install 2.5.0
mmolinac commented 5 years ago

@thbar I can check with out dev team and see if that version suits them, and then try.

mmolinac commented 5 years ago

@pkuczynski I can't, as we're using Debian for all of our environments. As the installation of version 2.5.0 asks for another Ruby version being already there (what I can't understand), I opted for another solution for the time being.

I still believe that the whole list of rvm1_rubies provided should be able to be installed at once, but that's my personal opinion.

DannyBen commented 5 years ago

I am also having the same problem (although without the Ansible role, just plain rvm install) - Ruby 2.5.0 cannot be installed with RVM, same error - on a pristine Ubuntu 18.

Installing Ruby 2.5.3 works.

bramses commented 5 years ago

Experiencing the same problem!

make[1]: *** [ext/openssl/all] Error 2
make[1]: *** Waiting for unfinished jobs....
linking shared-object ripper.bundle
make: *** [build-ext] Error 2
+__rvm_make:0> return 2

UPDATE:

Installing with the openssl flag worked for me.

brew install openssl
rvm install 2.5.0 --with-openssl-dir=`brew --prefix openssl`

More info here

Anyoks commented 5 years ago

Having a similar issue. No light?

Anyoks commented 5 years ago

Apparently You can't compile Ruby with RVM unless Ruby is already present on the system. Run this first: sudo apt-get install ruby-full Then re-run: rvm install ruby-2.5.0

thbar commented 5 years ago

Please note that Ruby 2.5.0 includes many security vulnerabilities (some important) which have been fixed in later 2.5.x releases. You should target latest 2.5.x (currently 2.5.7) instead of 2.5.0.

See https://www.ruby-lang.org/en/security/

Anyoks commented 5 years ago

@thbar thanks for pointing that out! I sure will update my Ruby.

nitishkumargupta commented 4 years ago

Apparently You can't compile Ruby with RVM unless Ruby is already present on the system. Run this first: sudo apt-get install ruby-full Then re-run: rvm install ruby-2.5.0

This worked for me. Thanks @Anyoks

thbar commented 4 years ago

@rvm/ansible I'll close this one. Ruby 2.5.0 is an old version and lacks important security fixes.

If someone meets installation issue with the latest 2.5.x, please re-open a specific issue!