![]() This means that you can have two different versions of the same gem, or you can make gems unaware of other gems on the system. In keeping with RVM’s mission of providing contained Ruby environments, it is also possible to install gems that are only associated with a single Ruby installation. Gems can be installed to extend the capabilities of the core Ruby distribution, and there are often gems that are required to be installed to get certain programs to function correctly. One common way to distribute code in Ruby is to use a format called gems. In order to use the version of Ruby installed on the system (not through RVM), you can specify: rvm use system To switch to the default Ruby, type: rvm default Set a default Ruby to use by using the -default flag: Once you’ve installed a few versions of Ruby, you can list them with this command: rvm listĪs you can see, RVM gives you a handy guide to tell you which are the current and the default Ruby versions. If you ever wish to uninstall a version of Ruby, you can do this simply by typing: Once you’ve selected the Ruby you wish to install, you can issue this command: We can list all of the Rubies we have available to install with this command: rvm list known If you are switching to another Ruby version, you can type: rvm useĪfter you type a space and then TAB twice, you will be presented with a list of the available Ruby versions. Keep in mind that this also works with arguments. For instance, we can type: rvm instĪt this point, we can hit TAB twice, and it will complete to: rvm install This will allow us to complete RVM commands by typing the TAB key twice after entering part of the command. We will enable RVM tab completion by putting the following line in our. If you would like help on a specific command, you can reference it after “help” to get more detailed instruction: You can get a list of the available commands by typing: rvm help There are also RVM flags that can alter the behavior of RVM, which are given in a similar way to command options. Rvm command_options command ruby_to_act_on If you’ve already installed RVM, you should have the rvm command available to you. We will be discussing the basic usage of this utility and how you can properly manage your Ruby environments. This article will assume that you’ve already installed RVM. ![]() In other articles, we covered how to install RVM on various platforms: ![]() Luckily, the Ruby Version Manager, known more widely as RVM, allows you to easily install multiple, contained versions of Ruby and easily switch between them. With conventional installations, this would impede your ability to be flexible. Different versions of Ruby may be necessary for different projects. ![]() Ruby on Rails, or RoR, is a popular development framework for the Ruby programming language that allows you to easily get your application up and running with minimal hassle.ĭeveloping applications often times requires that you emulate different environments. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |