How to install bundler in gmbset @global under RVM and this is the right way

I'm on OS X (if that matters).

If I install Ruby using RVM, it will install the Bundler on @global gemset by default

Say I want a different version of the binder. I suggested that all I need to do is execute

gem install bundler --version <SomeVersion> 

However, this will set the default binding to gemset, and RVM will not set PATH for it.

As a result, if I type bundler , it will still run the package that was installed with Ruby in @global

Two questions:

  • How can I install bundler in gglset @global.
  • Is this the correct template for installing bundler in gglset @global or am I missing something
+5
source share
1 answer

Here's how you can install bundler in a global gemset:

 rvm @global do gem install bundler 

as a practice, I don't see any problem, since the bundler is never part of the gemfile anyway.

One failure, if you have projects with several rails and a ruby ​​version (older versions 1.8.7 and rails 2.x) using a newer package, are not backward compatible, so you will be forced to use several versions of the package.

+8
source

Source: https://habr.com/ru/post/1214751/


All Articles