jeudi 1 mai 2014

version - Chruby installer Ruby 1.8.7 - Stack Overflow


I'm using chruby for version management and am cloning a project that is unfortunately in Ruby 1.8.7. Is it possible to install Ruby 1.8.7 with chruby? I'm having trouble finding resources for this process.




TL;DR


You can't, at least not using ruby-install. Ruby 1.8.7 is end-of-life, and support for it has been dropped by Postmodern's ruby-install tool.


Ruby 1.8.7 is Unsupported


The console error messages may vary depending on your installed libraries and compilers, but an unmodified Ruby 1.8.7 is unlikely to compile on more recent systems. For example, on Ubuntu 13.10:


$ ruby-install ruby 1.8.7
[lots of output elided]
math.c:37:13: error: missing binary operator before token "("
#elif define(ERANGE)
^
make: *** [math.o] Error 1
!!! Compiling ruby 1.8.7 failed!

Why Ruby 1.8.7 is Unsupported


Support for Ruby 1.8.7 was dropped by Postmodern on December 9, 2013. Commit f013ed2 explains:


commit f013ed2476ecce82ea41ff63de413daf2231b82b
Author: Postmodern <postmodern.mod3@gmail.com>
Date: Mon Dec 9 16:09:30 2013 -0800

Drop support for Ruby 1.8.x since it has reached End-of-Life.

* CVE-2013-4164 affects Ruby 1.8.x and there is no official patch.
Enabling users to install and run 1.8.x at this point is irresponsible.

Alternatives


Your alternatives include:



  1. Upgrading to a newer stable version of Ruby such as Ruby 2.1.0.

  2. Using a Ruby version manager such as RVM that, as of this writing, still supports Ruby 1.8.6-p420 and 1.8.7-p374.

  3. Use ruby-build instead of ruby-install. Follow the chruby instructions on using ruby-build in the README to make sure chruby can find the your newly-installed Ruby.

  4. Installing 1.8.7 manually somewhere that chruby can find it, and then using chruby to manage it.




We did remove all workaround patches and 1.8.x specific code in version 0.4.0. However, if you are installing ruby 1.8.7 on an older system (with older versions of GCC, openssl, etc), it should still compile. 1.8.7 will not compile on newer systems with newer versions of GCC, openssl, etc. If you really need to install 1.8.7, you can try applying RVM's 1.8.7 patches with the --patch option; although running a heavily patched ruby is risky. Also, RedHat and Debian are still maintaining ruby 1.8.7 packages for their enterprise users.



I'm using chruby for version management and am cloning a project that is unfortunately in Ruby 1.8.7. Is it possible to install Ruby 1.8.7 with chruby? I'm having trouble finding resources for this process.



TL;DR


You can't, at least not using ruby-install. Ruby 1.8.7 is end-of-life, and support for it has been dropped by Postmodern's ruby-install tool.


Ruby 1.8.7 is Unsupported


The console error messages may vary depending on your installed libraries and compilers, but an unmodified Ruby 1.8.7 is unlikely to compile on more recent systems. For example, on Ubuntu 13.10:


$ ruby-install ruby 1.8.7
[lots of output elided]
math.c:37:13: error: missing binary operator before token "("
#elif define(ERANGE)
^
make: *** [math.o] Error 1
!!! Compiling ruby 1.8.7 failed!

Why Ruby 1.8.7 is Unsupported


Support for Ruby 1.8.7 was dropped by Postmodern on December 9, 2013. Commit f013ed2 explains:


commit f013ed2476ecce82ea41ff63de413daf2231b82b
Author: Postmodern <postmodern.mod3@gmail.com>
Date: Mon Dec 9 16:09:30 2013 -0800

Drop support for Ruby 1.8.x since it has reached End-of-Life.

* CVE-2013-4164 affects Ruby 1.8.x and there is no official patch.
Enabling users to install and run 1.8.x at this point is irresponsible.

Alternatives


Your alternatives include:



  1. Upgrading to a newer stable version of Ruby such as Ruby 2.1.0.

  2. Using a Ruby version manager such as RVM that, as of this writing, still supports Ruby 1.8.6-p420 and 1.8.7-p374.

  3. Use ruby-build instead of ruby-install. Follow the chruby instructions on using ruby-build in the README to make sure chruby can find the your newly-installed Ruby.

  4. Installing 1.8.7 manually somewhere that chruby can find it, and then using chruby to manage it.



We did remove all workaround patches and 1.8.x specific code in version 0.4.0. However, if you are installing ruby 1.8.7 on an older system (with older versions of GCC, openssl, etc), it should still compile. 1.8.7 will not compile on newer systems with newer versions of GCC, openssl, etc. If you really need to install 1.8.7, you can try applying RVM's 1.8.7 patches with the --patch option; although running a heavily patched ruby is risky. Also, RedHat and Debian are still maintaining ruby 1.8.7 packages for their enterprise users.


0 commentaires:

Enregistrer un commentaire