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.
1. When I just have rubygems (without rvm or bundler), and when i
install a gem, where is it getting installed ?
2. When rubygems + rvm is installed, and when i install a gem, where
is it getting installed ?
3. 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.
1. 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.
2. 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.
3. 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.
`gem env` will show you where things are getting installed (and a lot
more, actually).
You might also want to run `gem --help` to get more familiar with the
capabilities and options.
HTH,
···
On Wed, Jan 5, 2011 at 4:53 AM, lucky Developer <lakshmanan@vinsol.com> wrote:
1. When I just have rubygems (without rvm or bundler), and when i
install a gem, where is it getting installed ?
2. When rubygems + rvm is installed, and when i install a gem, where
is it getting installed ?
3. when rubygems + rvm + bundler is installed, and when i install a
gem, where is it getting installed?
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: