![]() ![]() NOTE: There has been some confusion amongst new users as to the proper way to switch between Ruby For example, for Ruby 2.1.1: $ rvm use 2.1.1 Once you have installed a Ruby interpreter with RVM successfully you may then use it by executing the use command. As an example, to install and use Ruby 2.1.1 you may do: $ rvm install 2.1.1 ∞Installing rubiesĪssuming this shows "rvm is a function", you're good to go. It would mean though, that you have to manage dependencies manually. If you want to be able to run RVM commands by the user who does not have sudo rights, you would need to turn off automatic dependency installation: rvm autolibs disable Make sure that user, who calls RVM commands, especially rvm install, have sudo rights. When installing rubies, RVM might need to use sudo to install dependencies. To do this, and verify that RVM is loaded as a shell function, run: type rvm | head -1 ∞Automatic dependencies installation ![]() rvm needs to load for both interactive and non-interactive shells which is why it strongly is recommended to alter this file.įirst ensure that the previous step was successful and that rvm is loaded correctly. The condition is true if the string "$PS1" has zero length (a non-interactive shell). bashrc) contains the following line: & return In a few linux distributions, the default. You should now open a new shell and start playing with rvm.Ī note about the. Then, when you login or spawn a shell this will automatically load RVM regardless of the shell type. This means using rubies is not possible in this mode, but there are simple methods to load ruby: source $(rvm 1.9.3 do rvm env -path) In case of problems use one of following links as reference for configuring your terminal:įor non-interactive shells RVM will be added to PATH only, not loaded. ![]() When you log in either via ssh or the local shell account RVM will be loaded as a function. RVM also lets you use different rubies in a manner that won't mess with your existing ruby install (unless you tell it to) as well as letting you run multiple different rubies in separate terminals concurrently! ∞Getting startedįirst, you must ensure that you install RVM. Wondering why you should use RVM? For a start, not only does RVM make installing multiple ruby interpreters / runtimes easy and consistent, it provides features such as gemsets that aren't typically supported out of the box on most ruby installs. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |