To see what Ruby versions you have installed, run rvm ls . To switch between Ruby versions, run rvm use <version_number> (for example, rvm use 2.7.
Use `gem install -v` You may already be familiar with gem install , but if you add the -v flag, you can specify the version of the gem to install. Using -v you can specify an exact version or use version comparators.
Not by default. Nothing in the default install uses it, so it's not installed.
I'm not really sure, but maybe this can help:
update-alternatives --config ruby
... and here's the non-interactive, scriptable, way:
update-alternatives --set ruby /usr/bin/ruby1.9.1
You may find out about available alternatives and respective /usr/bin/...
paths by doing:
update-alternatives --query ruby
Martin - Take a look at the following link: http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/
This is where installation of ruby is heading for ubuntu servers. This should allow you to not only switch to a ruby version when needed, but also keep gems separated based on ruby versions, etc.
You can completely remove Ruby 1.8 too with:
sudo apt-get remove libruby1.8 ruby1.8 ruby1.8-dev rubygems1.8
After that, you will only have Ruby 1.9 installed.
sudo \curl -L https://get.rvm.io | bash -s stable --ruby --rails
will install an up-to-date version of ruby (and rails), and allow you to avoid brokenness of Ubuntu's RVM, see https://stackoverflow.com/a/9056395/497756.
If you go this route, get rid of Ubuntu-installed versions and associated packages like bundle
.
Details here: https://rvm.io/rvm/install/
(Note: this is the TL;DR version of the post by henry74.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With