So suppose 1 Gemfile uses devise 1.0 and another one also requires that same gem. Does bundle/rvm actually keeps 2 copies of the gem devise 1.0 when there are 2 different gemsets, one for each gemfile?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It depends from the gemset used. When you run
bundle installit will compile aGemfile.lockwith the required gems and fix the gem at the highest version available at that time (unless you specify an exact version or a different version with~>syntax).Then when you add new gems to your Gemfile it still use that version unless you use the
bundle update devisecommand. So as far as you not update manually devise it will use always the same gem.Rvm will reuse the same gem if it’s compatible with the second Gemfile and you’re in the same gemset otherwise it will install a second copy of the devise gem.
To avoid that you can add shared gem in the
@globalgemset and they will be available to all your gemsets.In every case it should not be an issue since a gem does not use a lot of disk space and different versions are handled using rvm/Gemfiles.