I am really confused with how these three (rubygems, rvm and bundler)
work in isolation when we are installing gems. Please do not tell me how
you work that will help me but I won’t learn what is exactly
happening when we play with rubygems, rvm and bundler.
My above single confusion can be broken down into these questions below.
When I just have rubygems (without rvm or bundler), and when i
install a gem, where is it getting installed ?
When rubygems + rvm is installed, and when i install a gem, where
is it getting installed ?
when rubygems + rvm + bundler is installed, and when i install a
gem, where is it getting installed?
Please help me understand this stuff. thanks a ton.
When I just have rubygems (without rvm or bundler), and when i
install a gem, where is it getting installed ?
If you ‘gem install’, it gets installed to your home directory. If you
‘sudo
gem install’, it gets installed to a global directory, I don’t quite
remember at the moment.
When rubygems + rvm is installed, and when i install a gem, where
is it getting installed ?
Into ~/.rvm/rubies/the_ruby_i’m_using/lib/ruby/gems/1.9/gems, or
something
very similar.
when rubygems + rvm + bundler is installed, and when i install a
gem, where is it getting installed?
The same place. Bundler only automates which gems get installed, not
where
they go.
thanks. what about a directory called .bundle in our app’s root folder.
what does it have and what role does it play ?
It contains a file, config, which is a YAML file that saves the options
you
ran bundler with, that way they can become the default.
Sometimes, if you run certain commands, it can contain a cache of your
gems.
But that’s not usual.
Also, you’ll want to put .bundle in your .gitignore, and Gemfile and
Gemfile.lock into your repository UNLESS you’re developing a gem, in
which
case, you just want the Gemfile. More here:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.