Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make RVM ignore ruby patch level

Tags:

ruby

rvm

Currently, my rvm based projects specify rvm 1.8.7@gemset in .rvmrc. This means that when I am installing the gemset of a new project, it will default to the latest patch level of 1.8.7, eg. ruby-1.8.7-p352 . Now I don't want to hard code '1.8.7-p352' in the rvmrc as other developers(or other projects) might have some other patch levels installed on their machine(from other projects) and also I don't want to install different patch levels of ruby on my machine.

Is there a way to make rvm ignore the patch level and just make it use any version of 1.8.7 installed - so that I can use one patchlevel of Ruby 1.8.7 across all projects.

like image 388
Akshay Rawat Avatar asked Aug 12 '11 04:08

Akshay Rawat


People also ask

Does RVM use Ruby version?

Ruby Version Manager (RVM) is a utility that allows you to add your own personal version of Ruby to a user. It allows you to add, remove, or have multiple versions of Ruby and its libraries live in your user directory.

Which is better RVM or Rbenv?

RVM is easier to install than Rbenv, RVM has more features than Rbenv, RVM includes a built-in Ruby installation mechanism while Rbenv does not.

How do I change the default version of RVM?

To set a default Ruby version with rvm, enter rvm --default use 3.0. 0 on the command line. To switch to the system ruby, enter rvm use system . To switch back to the default, rvm default .

What is the current version of RVM?

0-p481 is the latest, RVM will attempt to download, install, and set 2.0. 0-p481 as your default 2.0.


1 Answers

The thing you want to set up is called an rvm alias. See: http://rvm.io/rubies/alias

For your example the commands would be:

rvm alias create 1.8.7 ruby-1.8.7-p352
like image 109
andrewle Avatar answered Oct 19 '22 18:10

andrewle