Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I recompile a ruby with RVM?

Tags:

ruby

rvm

I installed Ruby 1.9.3 with RVM, and it works fine. I then made some changes in a ruby C source file, and I want to recompile and re-install it so I can use the changes. I haven't found any kind of rvm recompile command however.

like image 746
Dogweather Avatar asked Mar 12 '12 07:03

Dogweather


People also ask

How do I recompile Ruby with OpenSSL Termux?

You must recompile Ruby with OpenSSL support or change the sources in your Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL using RVM are available at http://rvm.io/packages/openssl. In the Gemfile , we're using our own source for gems: source 'http://gems.ourhost.org/' .


1 Answers

The problem with using rvm [reinstall|install] is that it will fetch and use precompiled binaries if it can find any. Sometimes, you really want to rebuild from source, probably because you're trying to use a more recent version of GCC (e.g. 4.8 or 4.9).

The correct flag is --disable-binary, not --force:

rvm reinstall --disable-binary 2.1 
like image 133
agarie Avatar answered Sep 23 '22 14:09

agarie