I am on OS X (if it matters).
If I install a Ruby using RVM, it will install Bundler by default to @global gemset
Let say I want a different version of the bundler. I assumed that all I needed to do is to execute
gem install bundler --version <SomeVersion>
However, this will install bundler to default gemset and RVM doesn't set a PATH to it.
As result, if I type bundler
it will still launch a bundler which was installed with Ruby into @global
Two questions:
Install BundlerSelect Tools | Bundler | Install Bundler from the main menu. Press Ctrl twice and execute the gem install bundler command in the invoked popup. Open the RubyMine terminal emulator and execute the gem install bundler command.
RVM gives you compartmentalized independent ruby setups. This means that ruby, gems and irb are all separate and self-contained - from the system, and from each other. You may even have separate named gemsets. Let's say, for example, that you are testing two versions of a gem, with ruby 2.1.
gem env – try to search in provided list under GEM PATHS, in specifications/default. remove there bundler-VERSION. gemspec. install bundler, if you don't have specific: gem install bundler:VERSION --default.
Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed. Bundler is an exit from dependency hell, and ensures that the gems you need are present in development, staging, and production. Starting work on a project is as simple as bundle install .
This is how you can install bundler in the global gemset:
rvm @global do gem install bundler
as a practice, I don't see any issue, since bundler is never part of the gemfile in any case.
One glitch to note, if you have projects running multiple rails and ruby version (as old as 1.8.7 and rails 2.x) using newer bundler is not backwards compatible, so you'll be forced to use multiple bundler versions.
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