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
Ah hah. rvm uninstall [RUBY]
followed by rvm install [RUBY]
does the trick.
or nicer:
rvm reinstall [RUBY]
Use:
rvm install --force
It explicitly asks RVM to use existing sources, in earlier versions this was default - but might be very confusing.
So other commands in ther for installing:
rvm try_install <ruby>
Will only install if not yet installed (your problem)
rvm reinstall <ruby>
is the same as:
rvm remove [--gems] <ruby>
rvm install <ruby>
obviously some time saved with reinstall
and use [--gems] to also remove all the gems that were installed with ruby.
mkdir -p projects/smth && cd projects smth
rvm use 1.9.3@gem --install --create --ruby-version
will go to project, install 1.9.3 (if not yet installed), create the gemset, and create .ruby-version
file (available only in RVM head before v. 1.11.0)
the other flgs:
--rvmrc
- already available in RVM - will create .rvmrc
file--versions-conf
- available only in RVM head before v. 1.11.0 - will create .versions.conf
- a configuration file for your project, you can put there any important information about your project ... like node.js versionor rvm reinstall [RUBY]
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